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:42Karthik 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:44016,243,5897,289,00002,117,632expected "3471790129549708 ", got "0 4903 4380 4132 4077 4124 4058 4091 4077 4060 4123 4084 4103 4092 4084 4085 6349 1 "
2Oct 6, 2026 00:44016,324,7027,326,00002,117,632expected "3472169586752993 ", got "0 5099 4383 4248 4110 4157 4087 4085 4131 4086 4104 4079 4087 4095 4072 4161 6400 1 "
3Oct 6, 2026 00:44016,316,6177,360,00002,117,632expected "3475488311690526 ", got "0 4928 4678 4150 4240 4114 4122 4166 4107 4114 4095 4108 4090 4097 4151 4112 6431 0 "