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 13:03Karthik 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 13:040135,199,267124,355,00002,113,536expected "3474361431452908 ", got " r6:6780 c256p:6531 c256:6155 c4k:8114 c8k:7118 l8:6600 l8b:6844 l4:6624 cu:7116 r6:6579 c256p:6181 c256:6156 c4k:8130 c8k:7124 l8:6602 l8b:6835 l4:6602 cu:7101 "
2Oct 5, 2026 13:040132,222,148123,313,00002,113,536expected "3471422101796617 ", got " r6:6701 c256p:6366 c256:6140 c4k:8125 c8k:7111 l8:6642 l8b:6643 l4:6503 cu:7072 r6:6479 c256p:6170 c256:6150 c4k:8111 c8k:7109 l8:6645 l8b:6643 l4:6504 cu:7070 "
3Oct 5, 2026 13:040133,228,796124,418,00002,113,536expected "3469810993628774 ", got " r6:6779 c256p:6521 c256:6136 c4k:8149 c8k:7109 l8:6643 l8b:7035 l4:6554 cu:7066 r6:6543 c256p:6157 c256:6127 c4k:8093 c8k:7085 l8:6631 l8b:7038 l4:6556 cu:7068 "