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 00:02Karthik 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 00:03016,495,0807,491,00002,117,632expected "3471240666619858 ", got "0 5088 4384 4308 4117 4125 4157 4541 4519 4521 4527 4499 4404 4123 4047 4104 6647 1 "
2Oct 6, 2026 00:03016,441,8057,447,00002,117,632expected "3473057372348724 ", got "0 4999 4397 4218 4118 4110 4208 4516 4568 4532 4549 4376 4087 4109 4028 4114 6593 0 "
3Oct 6, 2026 00:03016,523,7857,553,00002,117,632expected "3472075541854857 ", got "0 5123 4374 4157 4231 4109 4177 4486 4541 4498 4499 4500 4487 4598 4219 4118 6712 1 "