Sum of prime numbers Andrey Tsvetkov

Compute the sum of all prime numbers in a stream of binary integers as fast as possible.

Input: 1 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The uint64 sum of all values that are prime, printed as a decimal string.

Back to listDec 6, 2024 20:05Joad 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 6, 2024 20:0400000Error: expected "51117112660996 ", got "51117112644820 "stderr
2Dec 6, 2024 20:0400000Error: expected "50904763211246 ", got "50904763203523 "stderr
3Dec 6, 2024 20:0500000Error: expected "51301128044372 ", got "51301128042483 "stderr
4Dec 6, 2024 20:0500000Error: expected "51048525476283 ", got "51048525473222 "stderr
5Dec 6, 2024 20:0500000Error: expected "51113201969212 ", got "51113201968641 "stderr
6Dec 6, 2024 20:0521,48645,945,16617,913,000995,0002,531,328
7Dec 6, 2024 20:0521,50636,012,59517,929,000996,0002,527,232
8Dec 6, 2024 20:0521,51732,447,32317,939,000996,0002,527,232
9Dec 6, 2024 20:0521,59141,352,79218,000,0001,000,0002,523,136
10Dec 6, 2024 20:0521,61844,557,08018,023,0001,001,0002,281,472
11Dec 6, 2024 20:0521,61940,127,95417,023,0002,002,0002,527,232
12Dec 6, 2024 20:0521,62342,642,72917,025,0002,003,0002,269,184
13Dec 6, 2024 20:0521,79746,148,49117,162,0002,019,0002,531,328
14Dec 6, 2024 20:0522,07842,720,24417,384,0002,045,0002,527,232