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 22:56Karthik 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 22:57016,240,3277,280,00002,117,632expected "3472634934253312 ", got "0 5149 4318 4119 4098 4169 4104 4177 4120 4106 4126 4102 4135 4097 4124 4160 6413 1 "
2Oct 5, 2026 22:57016,255,8437,254,00002,117,632expected "3471435168745363 ", got "0 5125 4413 4128 4150 4086 4087 4152 4097 4109 4081 4086 4104 4097 4163 4089 6399 0 "
3Oct 5, 2026 22:57016,240,9167,260,00002,117,632expected "3474992708808836 ", got "0 5148 4294 4097 4103 4161 4114 4140 4101 4122 4089 4103 4121 4093 4171 4112 6400 0 "