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 6, 2026 00:48Karthik 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 6, 2026 00:490139,393,605130,337,00002,113,536expected "3467080841277289 ", got " sfl=6632 base=6470 sflpf=6453 pf1=6451 sfl=6447 base=6455 sflpf=6449 pf1=6445 sfl=6454 base=6454 sflpf=6460 pf1=6450 sfl=6446 base=6452 sflpf=6441 pf1=6446 sfl=6444 base=6463 sflpf=6446 pf1=6447 "
2Oct 6, 2026 00:490138,649,625129,326,00002,113,536expected "3470436822946267 ", got " sfl=6543 base=6420 sflpf=6405 pf1=6404 sfl=6397 base=6406 sflpf=6398 pf1=6404 sfl=6399 base=6399 sflpf=6398 pf1=6400 sfl=6391 base=6403 sflpf=6395 pf1=6404 sfl=6391 base=6399 sflpf=6404 pf1=6403 "
3Oct 6, 2026 00:490139,846,837130,781,00002,113,536expected "3469710415304479 ", got " sfl=6665 base=6486 sflpf=6471 pf1=6467 sfl=6469 base=6478 sflpf=6467 pf1=6463 sfl=6467 base=6488 sflpf=6502 pf1=6467 sfl=6468 base=6483 sflpf=6467 pf1=6469 sfl=6468 base=6479 sflpf=6466 pf1=6463 "