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 22:40Karthik 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 22:41016,588,0637,590,00002,117,632expected "3467913326342260 ", got "0 5767 4895 4745 4585 4589 4588 4548 4287 4061 4048 4015 4020 4107 4022 4109 6740 0 "
2Oct 5, 2026 22:41016,661,1957,644,00002,117,632expected "3470915602679404 ", got "0 5740 4952 4726 4572 4633 4555 4646 4485 4120 4030 4035 4059 4019 4104 4038 6772 1 "
3Oct 5, 2026 22:41016,607,3477,615,00002,117,632expected "3468281607109934 ", got "0 5519 4917 4588 4560 4491 4522 4487 4495 4572 4106 4115 4030 4004 4050 4013 6748 0 "