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 22:42Karthik 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 22:43016,909,0577,608,00002,117,632expected "3470658463224624 ", got "0 5736 4955 4597 4599 4527 4623 4535 4346 4108 4031 4058 4024 4037 4097 4030 6731 1 "
2Oct 5, 2026 22:43016,672,9797,640,00002,117,632expected "3467953777888634 ", got "0 5645 4927 4686 4559 4627 4522 4574 4567 4204 4066 4029 4097 4025 4126 4040 6771 1 "
3Oct 5, 2026 22:43016,716,6107,740,00002,117,632expected "3474802802940565 ", got "0 5617 4914 4712 4573 4589 4582 4520 4516 4095 4055 4012 4065 4057 4025 4088 6742 0 "