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 listApr 18, 2024 09:27Matt 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
1Apr 18, 2024 09:2700000Error: expected "53688667657495004 ", got "third_n: 2 4 10 6 2 3 1 6 1 0 8 8 10 8 9 10 5 | 0 0 8 3 0 6 0 3 10 4 4 0 0 1 3 6 53688677096746575 "
2Apr 18, 2024 09:2800000Error: expected "53681162112012914 ", got "third_n: 2 3 5 4 5 3 9 6 10 1 1 5 4 5 0 9 9 | 9 0 10 9 9 10 2 9 4 3 7 6 8 9 1 10 second_n: 2 1 1 7 3 9 0 8 8 3 4 10 4 0 10 1 1 | 0 2 7 0 2 2 1 1 10 1 2 6 0 5 1 8 53681157122451453 "