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:33Matt 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:3300000Error: Exit with code 1: Segmentation fault at address: 23636740992stderr
2Jun 16, 2024 20:3700000Error: Exit with code 1: Segmentation fault at address: 189174735296stderr
3Jun 16, 2024 20:3700000Error: expected "53688145947737031 ", got "53688210182857796 "
4Jun 16, 2024 20:3800000Error: expected "53682123860086280 ", got "53682361638122133 "
5Jun 16, 2024 20:3900000Error: expected "53682204572900702 ", got "53682251870459817 "
6Jun 16, 2024 20:3900000Error: expected "53686971603520750 ", got "53687003462290795 "
7Jun 16, 2024 20:4000000Error: Exit with code 1: Segmentation fault at address: 378349334976stderr
8Jun 16, 2024 20:4000000Error: expected "53688300341275983 ", got "53688311471656666 "
9Jun 16, 2024 20:4100000Error: expected "53691608145336350 ", got "53691809919727171 "
10Jun 16, 2024 20:4100000Error: expected "53692792942571502 ", got "53692865138332234 "
11Jun 16, 2024 20:425,240119,493,97143,494,29202,437,120
12Jun 16, 2024 20:335,263100,615,85543,681,28802,297,856
13Jun 16, 2024 20:335,268124,120,58043,721,03402,269,184
14Jun 16, 2024 20:425,271119,138,56443,748,22402,277,376
15Jun 16, 2024 20:425,284111,810,52943,857,26102,273,280
16Jun 16, 2024 20:335,312106,807,74544,088,89702,289,664