Parse dateTime Andrey Tsvetkov

Compute the sum of 5,000,000 UTC Unix timestamps as fast as possible.

Input

One RFC 3339 datetime per line on STDIN:

2017-05-04T14:31:30-03:00
2046-06-23T11:51:56-06:00
2031-08-14T13:18:38+06:00
2048-04-14T05:55:06-09:00
1980-08-28T00:43:03+02:00

Output

Print the sum of all UTC Unix timestamps (int64) to STDOUT.

Constraints

  • Datetimes are in the range 1950-01-01T00:00:00 to 2050-12-31T23:59:59
Back to listOct 5, 2026 14:52Karthik ReddyKarthik ReddyError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 14:53070,646,60057,303,00002,113,536expected "3471594049590154 ", got " base=6501 fx26=6223! fx26n=6217! base=6294 fx26=6202! fx26n=6213! base=6292 fx26=6198! fx26n=6205! "
2Oct 5, 2026 14:53066,147,62057,310,00002,113,536expected "3470915006183868 ", got " base=6464 fx26=6220! fx26n=6223! base=6291 fx26=6205! fx26n=6213! base=6286 fx26=6213! fx26n=6207! "
3Oct 5, 2026 14:53067,061,97658,183,00002,113,536expected "3467776015645397 ", got " base=7533 fx26=6206! fx26n=6203! base=6251 fx26=6188! fx26n=6206! base=6254 fx26=6196! fx26n=6192! "