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 04:58matsuoka-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 04:5800000Error: expected "53691469049739500 ", got "ok: 7861667456234986594 1001 0000 0000 0100 0000 0001 0000 0000 1330773 1000 0010 0000 0010 0000 0001 0000 0000 3013587 0100 0100 0000 1000 0000 0001 0000 0000 30678596 1000 0000 0010 0010 0000 0100 0000 0000 ...stderr
2Jun 4, 2024 04:5900000Error: expected "53683774074823453 ", got "ok: 7861667456234986594 1000 0000 1000 0000 0100 0001 0000 0000 5463954 1000 0000 0100 0000 0001 0000 0000 0100 44103232 1000 0000 1000 0000 1000 0000 0010 0000 48136442 "stderr
3Jun 4, 2024 04:5900000Error: expected "53690063799001417 ", got "ok: 7861667456234986594 0100 0100 0000 1000 0000 0001 0000 0000 6704818 1000 0000 0010 0010 0000 0100 0000 0000 6704819 1000 0000 0001 0000 0000 0100 0100 0000 6704820 0101 0000 0000 0100 0000 0010 0000 0000 1...stderr
4Jun 4, 2024 05:0100000Error: expected "53689576695151713 ", got "ok: 7861667456234986594 1000 0000 1000 0000 0100 0001 0000 0000 22285752 "stderr