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 15:24Karthik 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 15:25087,306,59378,351,00002,113,536expected "3469923864530338 ", got " base=6471 pfx=6657 pfx640=6556 fx26=6220! base=6293 pfx=6640 pfx640=6558 fx26=6223! base=6293 pfx=6632 pfx640=6553 fx26=6216! "
2Oct 5, 2026 15:25088,154,97479,333,00002,113,536expected "3472649059517926 ", got " base=6659 pfx=6796 pfx640=6722 fx26=6209! base=6259 pfx=6783 pfx640=6708 fx26=6206! base=6252 pfx=6788 pfx640=6735 fx26=6206! "
3Oct 5, 2026 15:25087,120,29578,317,00002,113,536expected "3473813112256581 ", got " base=6433 pfx=6681 pfx640=6557 fx26=6225! base=6261 pfx=6670 pfx640=6553 fx26=6225! base=6263 pfx=6659 pfx640=6552 fx26=6214! "