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:16Karthik 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:170119,831,899110,808,00002,113,536expected "3472680268481354 ", got " 262144:512:512=6952 262144:512:384=6789 262144:512:768=6811 131072:512:512=6973 524288:512:512=6785 262144:1024:512=6796 262144:256:512=6887 1048576:512:512=6941 262144:512:512=6790 262144:512:384=6786 262144:512:768...
2Oct 5, 2026 13:170120,935,713111,895,00002,113,536expected "3468803002225653 ", got " 262144:512:512=7039 262144:512:384=6844 262144:512:768=6880 131072:512:512=6964 524288:512:512=6867 262144:1024:512=6831 262144:256:512=6988 1048576:512:512=7155 262144:512:512=6930 262144:512:384=6837 262144:512:768...
3Oct 5, 2026 13:170119,680,664110,786,00002,113,536expected "3471018541909663 ", got " 262144:512:512=6894 262144:512:384=6780 262144:512:768=6793 131072:512:512=6916 524288:512:512=6813 262144:1024:512=6790 262144:256:512=6863 1048576:512:512=7037 262144:512:512=6786 262144:512:384=6768 262144:512:768...