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 listMay 27, 2024 20:26Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 27, 2024 20:2900000Error: expected "53685865036857981 ", got "53685912334417096 "
2May 27, 2024 20:4200000Error: Exit with code 1: Segmentation fault at address: 570490944stderr
3May 27, 2024 20:4100000Error: Exit with code 1: Segmentation fault at address: 1082163328stderr
4May 27, 2024 20:3900000Error: expected "53691448491706558 ", got "53691483813777225 "
5May 27, 2024 20:3800000Error: Exit with code 1: Segmentation fault at address: 302022672stderr
6May 27, 2024 20:3700000Error: expected "53693166426652215 ", got "53693178316946961 "
7May 27, 2024 20:3500000Error: expected "53687555026075731 ", got "53687631239702016 "
8May 27, 2024 20:3400000Error: expected "53688168163272602 ", got "53688232398393367 "
9May 27, 2024 20:3300000Error: expected "53682558643568379 ", got "53682569773949062 "
10May 27, 2024 20:3200000Error: Exit with code 1: Segmentation fault at address: 2416181376stderr
11May 27, 2024 20:3100000Error: expected "53688656928095760 ", got "53688668058476443 "
12May 27, 2024 20:3000000Error: expected "53681557003519310 ", got "53681581984733804 "
13May 27, 2024 20:2800000Error: expected "53680369260968937 ", got "53680387259663161 "
14May 27, 2024 20:2700000Error: Exit with code 1: main: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Segmentati...stderr
15May 27, 2024 20:266,219108,547,01351,619,29602,211,840
16May 27, 2024 20:266,225118,561,74651,665,48202,195,456
17May 27, 2024 20:406,241114,587,74851,796,54502,207,744
18May 27, 2024 20:406,296115,974,38452,254,48002,191,360
19May 27, 2024 20:406,348112,621,96352,690,58302,203,648
20May 27, 2024 20:436,371118,854,33352,876,59902,187,264
21May 27, 2024 20:436,399104,802,41553,108,56202,220,032
22May 27, 2024 20:436,409113,601,69353,195,69002,203,648
23May 27, 2024 20:266,441116,618,24453,464,14502,191,360