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 16: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 16:17016,156,2387,236,000020,480expected "3471372210954251 ", got "97 6538 1505 3849 4479 4268 4281 4183 4154 4174 4137 4162 4074 4126 4091 4056 4179 4064 "
2Oct 5, 2026 16:17016,106,5837,277,000020,480expected "3475072251340254 ", got "95 6610 1496 4020 4391 4432 4184 4220 4231 4194 4219 4173 4171 4164 4113 4189 4097 4173 "
3Oct 5, 2026 16:17016,081,8597,255,000020,480expected "3470418376025429 ", got "96 6587 1524 5373 4302 4276 4330 4192 4216 4121 4137 3116 5092 4149 4101 4178 4071 4656 "