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 14:04Matt 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 5, 2024 14:0400000Error: Exit with code 1: Segmentation fault at address: 378349334976stderr
2Jun 5, 2024 14:0500000Error: expected "53681703968190353 ", got "53681759805798477 "
3Jun 5, 2024 14:0600000Error: expected "53691696909052741 ", got "53691888277741072 "
4Jun 5, 2024 14:0600000Error: expected "53689600751492792 ", got "53689636073563459 "
5Jun 5, 2024 14:0700000Error: Exit with code 1: Segmentation fault at address: 378349335040stderr
6Jun 5, 2024 14:0700000Error: expected "53690274988106963 ", got "53690306868346085 "
7Jun 5, 2024 14:0800000Error: expected "53691418724464551 ", got "53691439054861021 "
8Jun 5, 2024 14:0800000Error: expected "53682937381527096 ", got "53682948511907779 "
9Jun 5, 2024 14:0900000Error: expected "53681780532106291 ", got "53681781439884093 "
10Jun 5, 2024 14:045,239106,825,44543,480,10402,445,312
11Jun 5, 2024 14:105,255106,347,64243,615,68802,277,376
12Jun 5, 2024 14:045,267119,473,18743,718,67002,277,376
13Jun 5, 2024 14:105,284117,619,73743,859,99202,265,088
14Jun 5, 2024 14:105,304110,342,02544,021,91602,183,168
15Jun 5, 2024 14:045,323107,852,62144,181,28102,293,760