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:02Matt 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:0200000Error: Exit with code 1: Segmentation fault at address: 378349334976stderr
2Jun 16, 2024 20:0300000Error: expected "53689615336386250 ", got "53689663561126705 "
3Jun 16, 2024 20:0400000Error: expected "53689899868418964 ", got "53690300992144671 "
4Jun 16, 2024 20:055,254111,587,18943,605,94602,297,856
5Jun 16, 2024 20:055,261125,646,41543,665,73002,297,856
6Jun 16, 2024 20:035,279111,627,82243,813,97602,277,376
7Jun 16, 2024 20:055,298120,054,69443,975,10402,301,952
8Jun 16, 2024 20:035,300122,568,07243,992,41002,281,472
9Jun 16, 2024 20:035,311123,361,70544,084,89102,289,664