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 28, 2022 09:14Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 28, 2022 09:0200000Error: expected "51175495376816 ", got "51175495376223 "stderr
2Dec 28, 2022 09:1428,45849,057,38224,042,0001,001,0002,265,088
3Dec 28, 2022 09:1428,46054,802,92124,044,0001,001,0002,265,088
4Dec 28, 2022 09:1428,46153,271,41524,045,0001,001,0002,265,088
5Dec 28, 2022 09:1428,47250,909,74923,051,0002,004,0002,383,872
6Dec 28, 2022 09:1428,49259,147,19923,068,0002,005,0002,265,088
7Dec 28, 2022 09:1428,60549,956,15623,159,0002,013,0002,469,888
8Dec 28, 2022 09:1428,61555,909,84924,174,0001,007,0002,527,232
9Dec 28, 2022 09:1428,75249,057,57823,278,0002,024,0002,469,888
10Dec 28, 2022 09:1428,83248,362,77625,372,00002,265,088
11Dec 28, 2022 09:1428,99292,754,57525,513,13602,240,512
12Dec 28, 2022 09:1429,32198,398,85825,802,43402,232,320
13Dec 28, 2022 09:1429,35493,631,17025,831,23602,236,416