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 5, 2024 11:09matsuoka-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 5, 2024 11:0900000Error: expected "53690083360967756 ", got "0101 0000 0000 0100 0000 0010 0000 0000 6745504 1000 0000 0001 0100 0000 0001 0000 0000 6745505 1000 0000 0100 0000 0000 1010 0000 0000 6745506 1000 0000 1000 0000 0100 0001 0000 0000 34133789 "stderr
2Jun 5, 2024 11:1000000Error: expected "53690713157426901 ", got "1000 0000 1000 0000 0100 0001 0000 0000 17936177 "stderr
3Jun 5, 2024 11:1000000Error: expected "53683062913806571 ", got "1000 0000 0100 0000 0001 0000 0000 0100 989716 1000 0000 1000 0000 1000 0000 0010 0000 5022926 1001 0000 0000 0100 0000 0001 0000 0000 29161626 1000 0010 0000 0010 0000 0001 0000 0000 30844440 "stderr
4Jun 5, 2024 11:1100000Error: expected "53691438186028000 ", got "0100 0100 0000 1000 0000 0001 0000 0000 27211914 1000 0000 0010 0010 0000 0100 0000 0000 27211915 1000 0000 0001 0000 0000 0100 0100 0000 27211916 0101 0000 0000 0100 0000 0010 0000 0000 37882346 1000 0000 000...stderr