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 12, 2026 15:52highload-churnerhighload-churnerError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 12, 2026 15:530271,650,269262,568,00002,113,536expected "3471308811111901 ", got "fstat=0 mode=33152 size=128960045 blk=2097152 off=0 mmap=1 Z=207991 NL=5000000 plus=2292738 minus=12499271 ws=0 first=1984-10-12T12:35:47-01:00| last=1958-06-10T02:40:23+11:00| "
2Oct 12, 2026 15:530271,462,548262,587,00002,113,536expected "3468952811595842 ", got "fstat=0 mode=33152 size=128958150 blk=2097152 off=0 mmap=1 Z=208370 NL=5000000 plus=2290389 minus=12501241 ws=0 first=1989-10-17T15:45:16-08:00| last=1966-06-29T17:51:40-08:00| "
3Oct 12, 2026 15:530271,794,932261,748,0001,001,0002,113,536expected "3471263307024456 ", got "fstat=0 mode=33152 size=128958840 blk=2097152 off=0 mmap=1 Z=208232 NL=5000000 plus=2290854 minus=12500914 ws=0 first=1980-08-17T15:06:16+04:00| last=1960-12-08T22:18:57-03:00| "