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 listJun 4, 2024 17:17Matt 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
1Jun 4, 2024 17:2100000Error: expected "53689124504126879 ", got "53689125411904681 "
2Jun 4, 2024 17:3000000Error: Exit with code 1: Segmentation fault at address: 1208025152stderr
3Jun 4, 2024 17:3000000Error: expected "53692461983876956 ", got "53692503099172281 "
4Jun 4, 2024 17:3000000Error: Exit with code 1: Segmentation fault at address: 71311376stderr
5Jun 4, 2024 17:2800000Error: expected "53681516731453554 ", got "53681558418633327 "
6Jun 4, 2024 17:2800000Error: expected "53691117583218925 ", got "53691129473513671 "
7Jun 4, 2024 17:2600000Error: Exit with code 1: Segmentation fault at address: 167804992stderr
8Jun 4, 2024 17:2600000Error: expected "53683532608378214 ", got "53683594186514523 "
9Jun 4, 2024 17:2600000Error: expected "53688363836886760 ", got "53688410291850189 "
10Jun 4, 2024 17:2300000Error: expected "53690095034153655 ", got "53690127482501624 "
11Jun 4, 2024 17:2300000Error: expected "53691400354858385 ", got "53691412876693051 "
12Jun 4, 2024 17:2200000Error: expected "53690052067678947 ", got "53690088900611704 "
13Jun 4, 2024 17:2200000Error: expected "53684352688571780 ", got "53684405043258080 "
14Jun 4, 2024 17:2100000Error: expected "53687626099919646 ", got "53687669203111507 "
15Jun 4, 2024 17:2000000Error: Exit with code 1: Segmentation fault at address: 570490944stderr
16Jun 4, 2024 17:2000000Error: Exit with code 1: Segmentation fault at address: 570491008stderr
17Jun 4, 2024 17:2000000Error: expected "53683308692331531 ", got "53683319822712214 "
18Jun 4, 2024 17:1900000Error: expected "53682515775716843 ", got "53682545558441613 "
19Jun 4, 2024 17:1900000Error: Exit with code 1: Segmentation fault at address: 335609984stderr
20Jun 4, 2024 17:1900000Error: expected "53691695714287699 ", got "53691746526345746 "
21Jun 4, 2024 17:1800000Error: Exit with code 1: Segmentation fault at address: 2281963776stderr
22Jun 4, 2024 17:1700000Error: expected "53679845118808481 ", got "53679899920865452 "
23Jun 4, 2024 17:1700000Error: expected "53691090465308960 ", got "53691148412016379 "
24Jun 4, 2024 17:215,507111,082,48745,711,23402,228,224
25Jun 4, 2024 17:215,530101,272,60345,901,28402,228,224
26Jun 4, 2024 17:215,538106,457,68845,963,74502,211,840