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 6, 2024 05:11matsuoka-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 6, 2024 05:1100000Error: expected "53686336279927203 ", got "1111638714 -1869574005 -1195853634 -640034354 -168430087 1515870953 1111638714 -1869574005 -1195853634 -640034354 -168430087 1515870953 43146 "stderr
2Jun 6, 2024 05:1400000Error: expected "53691605316634186 ", got "1785359011 -336860408 -993737511 -1936945955 1027423527 -1667457923 1785359011 -336860408 -993737511 -1936945955 1027423527 -1667457923 38424 "stderr
3Jun 6, 2024 05:1400000Error: No answer to stdout. Died or killed?
4Jun 6, 2024 05:1500000Error: expected "53684309355362315 ", got "1313754702 -1886417023 -656877373 -1566399883 -1229539784 1263225715 1313754702 -1886417023 -656877373 -1566399883 -1229539784 1263225715 42636 "stderr