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 20:27Matt 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 20:2700000Error: expected "53681668860151172 ", got "53681693841365666 "
2Jun 16, 2024 20:2700000Error: expected "53692501560436216 ", got "53692513450730962 "
3Jun 16, 2024 20:2800000Error: expected "53685194595875409 ", got "53685241032930958 "
4Jun 16, 2024 20:2800000Error: expected "53682158013942425 ", got "53682179871794854 "
5Jun 16, 2024 20:2900000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
6Jun 16, 2024 20:2900000Error: expected "53681290823410286 ", got "53681308822104510 "
7Jun 16, 2024 20:3000000Error: Exit with code 1: Segmentation fault at address: 189174735296stderr
8Jun 16, 2024 20:3100000Error: expected "53687697775373825 ", got "53687713890177067 "
9Jun 16, 2024 20:3100000Error: expected "53687844511072982 ", got "53687845418850784 "
10Jun 16, 2024 20:325,212129,635,23643,259,81602,408,448
11Jun 16, 2024 20:325,281118,325,67043,834,45102,437,120
12Jun 16, 2024 20:325,354116,084,82244,441,71102,187,264