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 08:34Matt 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:4900000Error: expected "53680129890149553 ", got "53680154358127076 "
2May 24, 2024 12:5000000Error: expected "53688530831717122 ", got "53688584634907818 "
3May 24, 2024 12:5000000Error: Exit with code 1: Segmentation fault at address: 0x6e0582c120stderr
4May 24, 2024 12:5100000Error: Exit with code 1: Segmentation fault at address: 0x2c0c602ce0stderr
5May 24, 2024 12:5100000Error: Exit with code 1: Segmentation fault at address: 0x5962c020stderr
6May 24, 2024 12:5100000Error: expected "53687643517742705 ", got "53687650951093903 "
7May 24, 2024 12:5200000Error: Exit with code 1: Segmentation fault at address: 0xb02ec16120stderr
8May 24, 2024 12:5200000Error: expected "53688300914416441 ", got "53688308347767639 "
9May 24, 2024 12:507,236123,755,89060,062,60302,293,760
10May 24, 2024 12:507,312123,765,78060,685,63602,179,072
11May 24, 2024 12:507,315135,838,04760,712,99502,289,664
12May 24, 2024 08:347,343132,095,80060,950,11002,191,360
13May 24, 2024 08:347,345139,488,80160,960,40802,174,976
14May 24, 2024 08:347,382117,165,98861,273,61902,277,376