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 16, 2024 20:16Matt 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 16, 2024 20:1600000Error: expected "53683004113306260 ", got "53683039435376927 "
2Jun 16, 2024 20:1700000Error: expected "53690555987336613 ", got "53690556895114415 "
3Jun 16, 2024 20:1700000Error: Exit with code 1: Segmentation fault at address: 378349334976stderr
4Jun 16, 2024 20:1800000Error: expected "53690483674118560 ", got "53690550149903410 "
5Jun 16, 2024 20:1800000Error: expected "53688512979497480 ", got "53688577214618245 "
6Jun 16, 2024 20:1900000Error: expected "53689739840641934 ", got "53690129449558307 "
7Jun 16, 2024 20:2000000Error: expected "53681195648247419 ", got "53681213175042948 "
8Jun 16, 2024 20:2000000Error: expected "53682442323490368 ", got "53682503901626677 "
9Jun 16, 2024 20:2100000Error: expected "53685044739703128 ", got "53685056629997874 "
10Jun 16, 2024 20:2100000Error: Exit with code 1: Segmentation fault at address: 53155990592stderr
11Jun 16, 2024 20:2200000Error: expected "53687276451007070 ", got "53687335091498441 "
12Jun 16, 2024 20:2300000Error: expected "53689829238848413 ", got "53689893473969178 "
13Jun 16, 2024 20:2300000Error: expected "53680183501043382 ", got "53680205358895811 "
14Jun 16, 2024 20:245,377104,883,26744,630,06102,297,856
15Jun 16, 2024 20:245,406109,117,11444,872,25802,297,856
16Jun 16, 2024 20:245,411109,375,99244,908,08602,424,832