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 1, 2022 07:20apuxbtapuxbtError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 1, 2022 07:1200000Error: expected "51264126534984 ", got "51264126534383 "
2Dec 1, 2022 07:2030,39552,696,31826,748,00002,265,088
3Dec 1, 2022 07:2030,55253,084,17924,895,0001,991,0002,523,136
4Dec 1, 2022 07:2030,57257,931,35124,911,0001,992,0002,383,872
5Dec 1, 2022 07:2030,61452,381,55224,945,0001,995,0002,265,088
6Dec 1, 2022 07:2030,61850,756,62524,949,0001,995,0002,392,064
7Dec 1, 2022 07:2030,64552,778,62125,970,000998,0002,265,088
8Dec 1, 2022 07:2030,66554,648,98824,987,0001,998,0002,383,872
9Dec 1, 2022 07:2030,67395,445,55426,992,52802,236,416
10Dec 1, 2022 07:2030,69252,771,88725,009,0002,000,0002,502,656
11Dec 1, 2022 07:1230,70092,498,28827,015,64902,228,224
12Dec 1, 2022 07:2030,72493,588,04627,036,70302,228,224
13Dec 1, 2022 07:2030,72992,289,11427,041,44002,228,224
14Dec 1, 2022 07:2030,73587,004,76127,047,15202,228,224
15Dec 1, 2022 07:2030,741100,555,26327,052,14502,236,416
16Dec 1, 2022 07:2030,769105,613,75227,076,90702,228,224
17Dec 1, 2022 07:2030,77456,029,48525,075,0002,006,0002,265,088
18Dec 1, 2022 07:1230,779106,163,67727,085,50302,240,512
19Dec 1, 2022 07:1230,948100,725,17127,233,89902,224,128