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 16:06Karthik 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 16:07016,921,2248,021,000020,480expected "3471048920654473 ", got "99 7334 98 7946 5284 5006 5227 5330 5490 4564 4152 4061 4129 4065 4069 4140 4065 4106 "
2Oct 5, 2026 16:07016,773,6317,908,000020,480expected "3473209841584965 ", got "95 7222 97 5987 5000 4731 4685 4873 4833 4884 4603 4363 4410 4340 4400 4568 4637 4160 "
3Oct 5, 2026 16:07016,708,1207,882,000020,480expected "3473542391154721 ", got "96 7182 97 6987 7293 4765 4727 5359 4198 4087 4047 4083 4046 4059 4135 4058 4150 4089 "