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 listApr 28, 2026 13:51Dominique GarmierDominique GarmierError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 1, 2026 12:49Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 12:49026,790,3984,952,0001,980,0002,355,200expected "10750251198783 ", got "10750251153036 "
2May 1, 2026 12:49026,880,2395,600,0001,120,0002,322,432expected "10859639798662 ", got "10859639753380 "
3May 1, 2026 12:49020,629,7445,906,000984,0002,359,296expected "10881141481565 ", got "10881141435555 "
4Apr 28, 2026 13:5210,17030,664,7985,967,0002,983,0002,367,488
5Apr 28, 2026 13:5210,17126,295,3796,962,0001,989,0002,367,488
6Apr 28, 2026 13:5210,21222,682,9646,990,0001,997,0002,367,488
7Apr 28, 2026 13:5210,22327,533,0595,998,0002,999,0002,367,488
8Apr 28, 2026 13:5210,22821,545,2596,001,0003,000,0002,465,792
9Apr 28, 2026 13:5210,23725,268,3457,007,0002,002,0002,375,680
10Apr 28, 2026 13:5210,24825,253,9047,015,0002,004,0002,326,528
11Apr 28, 2026 13:5210,31327,192,5117,059,0002,017,0002,375,680
12Apr 28, 2026 13:5210,34029,036,2678,089,0001,011,0002,363,392