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 16:09Karthik 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 16:10016,015,6077,212,000020,480expected "3474682435458917 ", got "96 6539 94 5266 4539 4205 4308 4198 4176 4122 4087 4101 4067 4127 4084 4113 4186 4092 "
2Oct 5, 2026 16:10016,032,9777,197,000020,480expected "3472252761925031 ", got "95 6513 95 5252 4597 4216 4318 4147 4157 4097 4106 4114 4102 4082 4042 4038 4114 4036 "
3Oct 5, 2026 16:10016,093,1177,264,000020,480expected "3476605244687233 ", got "97 6586 93 5345 4315 4369 4254 4168 4236 4178 4193 4129 5099 3160 5123 3177 4137 4162 "