Parse integers Sergey Svistunov

Compute the sum of integers read from STDIN as fast as possible.

Input: 50 000 000 lines, each containing one integer in the range [0; 2147483647].

629871117
2024562523
1372689083
1021777120
2111176472

Output: The uint64 sum of all numbers, printed as a decimal string.

Note: Integer overflow is expected – use a 64-bit accumulator.

Back to listDec 27, 2024 22:02Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 27, 2024 22:0200000Error: expected "53685463041521327 ", got "53685465401468931 "stderr
2Dec 27, 2024 22:024,25057,807,98733,256,0002,015,0002,453,504
3Dec 27, 2024 22:024,27458,446,58334,462,0001,013,0002,387,968
4Dec 27, 2024 22:024,32360,219,16732,888,0002,989,0002,449,408
5Dec 27, 2024 22:024,35858,867,57434,163,0002,009,0002,449,408
6Dec 27, 2024 22:024,38357,713,00133,346,0003,031,0002,457,600
7Dec 27, 2024 22:024,39658,373,93534,460,0002,027,0002,449,408
8Dec 27, 2024 22:024,40761,738,58835,560,0001,016,0002,392,064
9Dec 27, 2024 22:024,40968,208,27635,578,0001,016,0002,297,856
10Dec 27, 2024 22:024,43867,663,16133,847,0002,986,0002,469,888
11Dec 27, 2024 22:024,50761,355,86036,399,0001,011,0002,297,856
12Dec 27, 2024 22:024,53762,241,92135,625,0002,035,0002,449,408
13Dec 27, 2024 22:024,62563,900,05036,364,0002,020,0002,297,856