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 listDec 27, 2024 21:53Joad NacerJoad NacerError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 27, 2024 21:5400000Error: expected "53688928172493138 ", got "53688940588904334 "stderr
2Dec 27, 2024 21:5400000Error: expected "53692518909573298 ", got "53692535300728023 "stderr
3Dec 27, 2024 21:534,20957,990,80833,937,000998,0002,310,144
4Dec 27, 2024 21:534,23955,452,03333,172,0002,010,0002,297,856
5Dec 27, 2024 21:534,23956,357,93134,179,0001,005,0002,310,144
6Dec 27, 2024 21:534,24455,058,05233,214,0002,012,0002,383,872
7Dec 27, 2024 21:534,25857,992,09634,336,0001,009,0002,301,952
8Dec 27, 2024 21:534,26362,197,38833,363,0002,022,0002,297,856
9Dec 27, 2024 21:534,27055,782,66132,407,0003,038,0002,306,048
10Dec 27, 2024 21:534,27460,135,53232,436,0003,040,0002,297,856
11Dec 27, 2024 21:534,27558,830,64232,439,0003,041,0002,301,952
12Dec 27, 2024 21:534,28965,790,78035,597,00002,297,856
13Dec 27, 2024 21:534,29064,149,40734,593,0001,017,0002,293,760
14Dec 27, 2024 21:534,31663,596,90733,834,0001,990,0002,535,424
15Dec 27, 2024 21:534,34259,287,87735,036,0001,001,0002,531,328
16Dec 27, 2024 21:534,37158,138,91035,275,0001,007,0002,273,280
17Dec 27, 2024 21:534,56862,025,69336,919,000997,0002,293,760