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 6, 2026 02:13Karthik 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 6, 2026 02:13018,472,8397,258,000020,480expected "3472347666620833 ", got "2330 6446 134 5171 4336 4071 4075 4122 4092 4138 4091 4167 4055 4043 4069 4081 4095 4059 "
2Oct 6, 2026 02:13018,318,3497,217,000020,480expected "3473482010929101 ", got "2328 6397 117 5035 4245 4097 4072 4034 4033 4118 4040 4109 4053 4047 4135 4054 4094 4046 "
3Oct 6, 2026 02:13018,402,8667,235,000020,480expected "3472605434389303 ", got "2308 6463 120 5001 4167 4171 4107 4215 4042 4380 4026 4130 4235 4097 4092 4055 4050 4090 "