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:36Karthik 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:370123,994,288114,958,00002,113,536expected "3472837863608621 ", got " fold=6459 a6=6330 a4=6316 d512=6311 d256=6300 f16=6302 fold=6294 a6=6327 a4=6308 d512=6327 d256=6300 f16=6302 fold=6298 a6=6326 a4=6313 d512=6321 d256=6378 f16=6309 "
2Oct 5, 2026 14:370124,833,123114,548,00002,113,536expected "3474417808248064 ", got " fold=6467 a6=6340 a4=6276 d512=6295 d256=6290 f16=6276 fold=6282 a6=6330 a4=6274 d512=6302 d256=6284 f16=6271 fold=6277 a6=6337 a4=6279 d512=6304 d256=6287 f16=6274 "
3Oct 5, 2026 14:370123,114,360114,252,00002,113,536expected "3472044978654097 ", got " fold=6460 a6=6310 a4=6283 d512=6275 d256=6280 f16=6262 fold=6260 a6=6303 a4=6275 d512=6268 d256=6278 f16=6264 fold=6263 a6=6295 a4=6275 d512=6277 d256=6276 f16=6264 "