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 listJul 3, 2026 23:17Victor MerckléVictor MerckléError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 3, 2026 23:20012,035,9384,202,00002,117,632expected "51300686686056 ", got "51298539202469 "stderr
2Jul 3, 2026 23:204,56512,067,2684,018,00002,117,632stderr
3Jul 3, 2026 23:204,68811,949,8634,126,00002,117,632stderr
4Jul 3, 2026 23:204,70212,035,4924,138,00002,117,632stderr
5Jul 3, 2026 23:204,76512,041,8144,194,00002,117,632stderr
6Jul 3, 2026 23:204,77211,956,6644,200,00002,117,632stderr
7Jul 3, 2026 23:204,78012,037,8364,207,00002,117,632stderr
8Jul 3, 2026 23:204,78512,213,0404,211,00002,117,632stderr
9Jul 3, 2026 23:204,83512,032,9994,255,00002,117,632stderr