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 12:52Karthik 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 12:530153,289,283144,328,00002,113,536expected "3469489724745149 ", got " v0:7584 v1:8275 v2:7762 v3:7566 v4:7640 v5:7469 v6:8138 v7:8460 v8:8776 v0:7417 v1:8246 v2:7749 v3:7577 v4:7649 v5:7470 v6:8141 v7:8463 v8:8776 "
2Oct 5, 2026 12:530149,864,083140,941,00002,113,536expected "3473696582077727 ", got " v0:7749 v1:7694 v2:7441 v3:7484 v4:7571 v5:7510 v6:8114 v7:7859 v8:8730 v0:7425 v1:7495 v2:7420 v3:7488 v4:7562 v5:7511 v6:8121 v7:7858 v8:8726 "
3Oct 5, 2026 12:530148,958,029140,148,00002,113,536expected "3471487773201742 ", got " v0:7541 v1:7542 v2:7371 v3:7394 v4:7517 v5:7564 v6:8075 v7:7866 v8:8733 v0:7361 v1:7503 v2:7373 v3:7385 v4:7517 v5:7562 v6:8075 v7:7876 v8:8733 "