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 5, 2024 14:14Matt 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 5, 2024 14:1400000Error: expected "53691673711919703 ", got "53691737947040468 "
2Jun 5, 2024 14:1500000Error: expected "53687587866652541 ", got "53687812915193734 "
3Jun 5, 2024 14:1600000Error: expected "53687772142142637 ", got "53687820366883092 "
4Jun 5, 2024 14:1600000Error: expected "53682679913489751 ", got "53682680821267553 "
5Jun 5, 2024 14:1700000Error: expected "53686493321541156 ", got "53686888827901744 "
6Jun 5, 2024 14:1700000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
7Jun 5, 2024 14:1800000Error: Exit with code 1: Segmentation fault at address: 378349334976stderr
8Jun 5, 2024 14:185,248117,776,00843,561,04702,289,664
9Jun 5, 2024 14:185,264117,776,37943,690,34502,285,568
10Jun 5, 2024 14:185,312104,698,30444,088,65702,301,952