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 4, 2024 11:38matsuoka-601matsuoka-601Error
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2024 11:3800000Error: expected "53689692317069586 ", got "1001 0000 0000 0100 0000 0001 0000 0000 5163395 1000 0010 0000 0010 0000 0001 0000 0000 6846209 0100 0100 0000 1000 0000 0001 0000 0000 34511218 1000 0000 0010 0010 0000 0100 0000 0000 34511219 1000 0000 0001 ...stderr
2Jun 4, 2024 11:5100000Error: expected "53690587161407416 ", got "1000 0000 1000 0000 0100 0001 0000 0000 14403164 "stderr
3Jun 4, 2024 11:5200000Error: expected "53690659248694048 ", got "1000 0000 1000 0000 0100 0001 0000 0000 14486727 "stderr
4Jun 4, 2024 11:5900000Error: expected "53684109546206200 ", got "1000 0000 1000 0000 0100 0001 0000 0000 3961006 1000 0000 0100 0000 0001 0000 0000 0100 42600284 1000 0000 1000 0000 1000 0000 0010 0000 46633494 "stderr