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:35Karthik 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:35011,224,1551,164,00002,117,632expected "3472061720205336 ", got "end: 1:580/580 16:334/320 64:412/248 256:311/272 512:357/260 1024:343/256 2048:330/240 3072:362/240 4096:290/240 6144:296/240 8192:299/240 12288:380/240 16384:299/240 32768:299/240 beg: 1:283/200 16:273/204 64:270/240...
2Oct 5, 2026 13:35011,161,59401,163,0002,117,632expected "3469736794269618 ", got "end: 1:368/368 16:284/216 64:284/236 256:302/216 512:461/256 1024:296/240 2048:281/236 3072:319/204 4096:278/236 6144:287/240 8192:281/236 12288:327/208 16384:287/236 32768:307/200 beg: 1:284/240 16:274/236 64:283/236...
3Oct 5, 2026 13:35011,217,9791,160,00002,117,632expected "3471275478362439 ", got "end: 1:348/348 16:616/340 64:298/244 256:305/252 512:314/252 1024:333/216 2048:305/196 3072:294/236 4096:287/236 6144:360/236 8192:316/204 12288:297/232 16384:294/236 32768:342/236 beg: 1:272/200 16:269/240 64:271/204...