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 12:56Karthik 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 12:580132,548,381123,651,00002,113,536expected "3469505967657347 ", got " r4p1k:6750 r4p2k:6668 r6:6589 r8:6672 r8p2k:6779 r12:7025 r16:7406 r2:6857 r8p5:6663 r4p1k:6591 r4p2k:6581 r6:6521 r8:6666 r8p2k:6767 r12:7019 r16:7419 r2:6856 r8p5:6660 "
2Oct 5, 2026 12:580132,178,930123,365,00002,113,536expected "3473438789865253 ", got " r4p1k:6715 r4p2k:6615 r6:6594 r8:6622 r8p2k:6741 r12:7045 r16:7325 r2:6887 r8p5:6634 r4p1k:6599 r4p2k:6583 r6:6584 r8:6632 r8p2k:6736 r12:7052 r16:7330 r2:6896 r8p5:6627 "
3Oct 5, 2026 12:580131,858,913123,058,00002,113,536expected "3473901691417438 ", got " r4p1k:6688 r4p2k:6550 r6:6537 r8:6610 r8p2k:6664 r12:6994 r16:7349 r2:7054 r8p5:6610 r4p1k:6529 r4p2k:6532 r6:6526 r8:6612 r8p2k:6672 r12:6988 r16:7346 r2:7050 r8p5:6623 "