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:30Karthik 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:310101,432,19392,656,00002,113,536expected "3470651325267825 ", got " base=6471 c512=6464 c128=6629 l768=6433 l1024=6523 l256=6463 c1m=7368 base=6349 c512=6447 c128=6564 l768=6303 l1024=6369 l256=6362 c1m=6845 "
2Oct 5, 2026 14:310100,189,23891,269,00002,113,536expected "3474143354058335 ", got " base=6451 c512=6430 c128=6542 l768=6312 l1024=6329 l256=6390 c1m=6758 base=6283 c512=6410 c128=6537 l768=6314 l1024=6330 l256=6382 c1m=6757 "
3Oct 5, 2026 14:310100,656,64891,737,00002,113,536expected "3469937022828174 ", got " base=6491 c512=6485 c128=6562 l768=6288 l1024=6319 l256=6314 c1m=6962 base=6279 c512=6476 c128=6550 l768=6363 l1024=6325 l256=6311 c1m=6977 "