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 24, 2024 12:47Matt 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 24, 2024 12:4700000Error: Exit with code 1: Segmentation fault at address: 0x16b0b01c0stderr
2May 24, 2024 12:4700000Error: Exit with code 1: Segmentation fault at address: 0x16b0b01c0stderr
3May 24, 2024 12:4800000Error: expected "53686798601060739 ", got "53686838008288174 "
4May 24, 2024 12:4800000Error: expected "53681742094564554 ", got "53681766562542077 "
5May 24, 2024 12:4800000Error: expected "53687907140137706 ", got "53687977115995120 "
6May 24, 2024 12:497,891135,083,80865,497,92102,285,568
7May 24, 2024 12:497,982126,337,39466,246,70502,273,280
8May 24, 2024 12:498,006134,405,98266,451,40402,281,472