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 15:19Karthik 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 15:20075,490,15465,499,0001,012,0002,117,632expected "3466814611268325 ", got "L 5000000 Z 208204 -00 0 +00 0 offmin 99 y 1949-2051 U -631150612..2556143908 (U0 -631152000 U1 2556144000) up 2499875 | off 209685 208635 208787 208517 207742 208709 208457 207416 207959 208269 208170 208228 0 207297...
2Oct 5, 2026 15:20075,322,94066,481,00002,117,632expected "3473895813178169 ", got "L 5000000 Z 208508 -00 0 +00 0 offmin 99 y 1949-2051 U -631151501..2556143913 (U0 -631152000 U1 2556144000) up 2499831 | off 208776 208607 207619 207421 208568 209186 207661 207788 208004 208173 207731 209202 0 208669...
3Oct 5, 2026 15:20075,313,80266,464,00002,117,632expected "3473490385963513 ", got "L 5000000 Z 208248 -00 0 +00 0 offmin 99 y 1949-2051 U -631151467..2556141214 (U0 -631152000 U1 2556144000) up 2499759 | off 207926 208469 208002 208153 208745 208230 208261 207364 208138 208670 208462 208885 0 208430...