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 14:01Karthik 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 14:02088,016,23479,139,00002,113,536expected "3472903099427007 ", got " p15=6742 nrawb3=6411 nraw=6524 b3=6464 p15=6594 nrawb3=6413 nraw=6513 b3=6475 p15=6591 nrawb3=6409 nraw=6514 b3=6462 "
2Oct 5, 2026 14:02087,623,44578,684,00002,113,536expected "3472485316465870 ", got " p15=6740 nrawb3=6365 nraw=6467 b3=6431 p15=6556 nrawb3=6357 nraw=6461 b3=6432 p15=6557 nrawb3=6363 nraw=6514 b3=6432 "
3Oct 5, 2026 14:02088,147,83179,288,00002,113,536expected "3473534482914058 ", got " p15=6773 nrawb3=6447 nraw=6488 b3=6520 p15=6575 nrawb3=6444 nraw=6488 b3=6520 p15=6580 nrawb3=6443 nraw=6485 b3=6519 "