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:54Karthik 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:55017,953,9378,945,00002,117,632expected "3473086317293707 ", got "0 13674 6618 4666 4465 4480 4480 4554 4707 4662 4510 4685 4648 4666 4504 4382 8083 0 "
2Oct 5, 2026 22:55018,084,2629,055,00002,117,632expected "3471342131510328 ", got "0 13130 7252 4611 4571 4470 4483 4559 4655 4682 4505 4705 4729 4765 4749 4716 8177 1 "
3Oct 5, 2026 22:55017,633,7948,610,00002,117,632expected "3472423803432634 ", got "0 12616 5073 4661 4451 4529 4548 4572 4449 4490 4498 4492 4477 4346 4594 4559 7747 0 "