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 7, 2024 15:22Matt 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 7, 2024 15:2200000Error: expected "53691569757165520 ", got "53691973258069252 "
2Jun 7, 2024 15:2300000Error: Exit with code 1: Segmentation fault at address: 189174735296stderr
3Jun 7, 2024 15:2500000Error: expected "53689435180439845 ", got "53689531622678347 "
4Jun 7, 2024 15:2500000Error: Exit with code 1: Segmentation fault at address: 53155990592stderr
5Jun 7, 2024 15:2600000Error: expected "53683565186935703 ", got "53683831765163520 "
6Jun 7, 2024 15:2600000Error: expected "53688148506990958 ", got "53688212742111723 "
7Jun 7, 2024 15:2700000Error: Exit with code 1: Segmentation fault at address: 189174735296stderr
8Jun 7, 2024 15:275,264109,358,49343,692,15302,289,664
9Jun 7, 2024 15:275,361105,846,97144,492,85402,412,544
10Jun 7, 2024 15:275,401115,850,11944,826,54602,301,952