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:00Karthik 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:010113,567,313104,575,00002,113,536expected "3470428645672716 ", got " base=6560 nomin=6394 pf1=6398 x16=6652 base=6387 nomin=6386 pf1=6393 x16=6651 base=6394 nomin=6380 pf1=6395 x16=6645 base=6391 nomin=6420 pf1=6399 x16=6646 "
2Oct 6, 2026 00:010114,074,232103,947,0001,048,0002,113,536expected "3472364962446481 ", got " base=6558 nomin=6403 pf1=6406 x16=6663 base=6401 nomin=6383 pf1=6412 x16=6670 base=6395 nomin=6387 pf1=6409 x16=6671 base=6398 nomin=6382 pf1=6409 x16=6666 "
3Oct 6, 2026 00:010115,675,301106,641,00002,113,536expected "3472535133220523 ", got " base=6619 nomin=6432 pf1=6438 x16=6982 base=6585 nomin=6427 pf1=6452 x16=6979 base=6464 nomin=6425 pf1=6442 x16=7015 base=6461 nomin=6421 pf1=6440 x16=6973 "