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:59Karthik 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 23:00016,612,9717,603,00002,117,632expected "3469593327016628 ", got "0 6110 5290 5021 4932 4390 4061 4127 4041 4049 4034 4044 4075 4030 4103 4060 6738 0 "
2Oct 5, 2026 23:00016,635,9227,655,00002,117,632expected "3472499169078031 ", got "0 5936 5326 4912 4926 4846 4548 4112 4023 4057 4016 4058 4020 4037 4092 4003 6793 0 "
3Oct 5, 2026 23:00016,627,0737,648,00002,117,632expected "3469380482773556 ", got "0 6051 5344 4946 4935 4889 4179 4129 4043 4055 4038 4026 4066 4034 4121 4043 6791 1 "