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 14:13Matt 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 14:1300000Error: Exit with code 1: Segmentation fault at address: 0x5962c020stderr
2May 24, 2024 14:1300000Error: expected "53692138174189241 ", got "53692145607540439 "
3May 24, 2024 14:1300000Error: expected "53683768299311225 ", got "53683814085956846 "
4May 24, 2024 14:1400000Error: Exit with code 1: Segmentation fault at address: 0x2c0c602d00stderr
5May 24, 2024 14:1400000Error: expected "53690728672378933 ", got "53690775127342362 "
6May 24, 2024 14:1400000Error: Exit with code 1: Segmentation fault at address: 0x5d8b0160stderr
7May 24, 2024 14:1500000Error: expected "53688641387552799 ", got "53688699334260218 "
8May 24, 2024 14:1500000Error: Exit with code 1: Segmentation fault at address: 0xb02ec16140stderr
9May 24, 2024 14:156,548122,763,88254,347,68202,174,976
10May 24, 2024 14:156,605126,402,64354,820,69602,281,472
11May 24, 2024 14:156,618131,150,31354,927,66602,297,856