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 13:39Matt 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 13:3900000Error: expected "53683507403764330 ", got "53683585086915268 "
2Jun 5, 2024 13:3900000Error: Exit with code 1: Segmentation fault at address: 378164751872stderr
3Jun 5, 2024 13:4000000Error: expected "53690051044041977 ", got "53690454516504109 "
4Jun 5, 2024 13:4100000Error: expected "53686142579099901 ", got "53686383313880556 "
5Jun 5, 2024 13:4100000Error: expected "53683743213855774 ", got "53683772996580544 "
6Jun 5, 2024 13:4100000Error: Exit with code 1: Segmentation fault at address: 380921491968stderr
7Jun 5, 2024 13:4200000Error: expected "53680411926882574 ", got "53680489610033512 "
8Jun 5, 2024 13:425,213106,505,89043,269,86302,179,072
9Jun 5, 2024 13:415,223109,907,43343,353,01602,281,472
10Jun 5, 2024 13:405,245116,966,56743,533,03802,179,072
11Jun 5, 2024 13:425,276108,153,81543,794,26402,179,072
12Jun 5, 2024 13:425,277113,483,55543,798,04602,289,664
13Jun 5, 2024 13:415,290111,441,47743,905,56502,289,664
14Jun 5, 2024 13:415,294117,210,76043,937,68702,297,856
15Jun 5, 2024 13:405,300119,907,92143,992,61402,289,664
16Jun 5, 2024 13:405,359116,583,65244,483,36402,289,664