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 19:51Matt 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 19:5100000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
2Jun 16, 2024 19:5200000Error: expected "53683086016546513 ", got "53683326992211770 "
3Jun 16, 2024 19:5200000Error: Exit with code 1: Segmentation fault at address: 189174735296stderr
4Jun 16, 2024 19:5200000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
5Jun 16, 2024 19:5300000Error: expected "53686854986197872 ", got "53686868849743631 "
6Jun 16, 2024 19:5300000Error: expected "53688977738928109 ", got "53689239407887454 "
7Jun 16, 2024 19:5300000Error: expected "53682578003271556 ", got "53682812150889886 "
8Jun 16, 2024 19:5400000Error: expected "53687656644242711 ", got "53687678960587332 "
9Jun 16, 2024 19:5400000Error: Exit with code 1: Segmentation fault at address: 378349335040stderr
10Jun 16, 2024 19:556,035127,411,90750,089,28902,187,264
11Jun 16, 2024 19:556,065110,767,05750,337,31902,285,568
12Jun 16, 2024 19:556,075123,645,14750,418,79402,285,568