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:05Karthik 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:06019,686,5777,737,000020,480expected "3470647470598757 ", got "3198 7038 117 7821 6679 4748 4401 4093 4130 4044 4141 4056 4057 4095 4060 4077 4056 4097 "
2Oct 5, 2026 15:06019,615,0157,590,000020,480expected "3473526007529618 ", got "3214 6906 117 7710 6071 4598 4121 4152 4041 4040 4071 4034 4079 4061 4048 4158 4055 4085 "
3Oct 5, 2026 15:06019,576,8347,615,000020,480expected "3474281462453342 ", got "3194 6934 228 8518 4738 4230 4228 4107 4336 4084 4363 4041 4136 4157 4103 4165 4097 4071 "