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:34Matt 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:3400000Error: expected "53691616634068986 ", got "53691664858809441 "
2Jun 16, 2024 20:355,248117,723,36843,554,68702,285,568
3Jun 16, 2024 20:365,258115,855,09843,642,13502,297,856
4Jun 16, 2024 20:365,261125,797,84043,666,18502,433,024
5Jun 16, 2024 20:355,280110,748,47643,821,75102,420,736
6Jun 16, 2024 20:365,286113,422,18543,872,58902,269,184
7Jun 16, 2024 20:355,301104,804,32144,002,38702,277,376