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:09Matt 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:0900000Error: expected "53682013921856565 ", got "53682061219415680 "
2Jun 16, 2024 20:1000000Error: expected "53681555450719154 ", got "53681978342852081 "
3Jun 16, 2024 20:1000000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
4Jun 16, 2024 20:1100000Error: expected "53689058879188596 ", got "53689094201259263 "
5Jun 16, 2024 20:1200000Error: expected "53683967569210259 ", got "53684356532572344 "
6Jun 16, 2024 20:1200000Error: expected "53690782295981668 ", got "53691185768443800 "
7Jun 16, 2024 20:1300000Error: Exit with code 1: Segmentation fault at address: 401602601472stderr
8Jun 16, 2024 20:135,398105,936,70444,803,20602,179,072
9Jun 16, 2024 20:135,451114,845,41245,247,44302,441,216
10Jun 16, 2024 20:135,553106,952,16146,086,82502,174,976