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 listJun 26, 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
1Jun 26, 2026 23:19012,257,0874,747,00002,113,536expected "51397235952640 ", got "51395088469011 "
2Jun 26, 2026 23:195,36312,220,3194,720,00002,113,536
3Jun 26, 2026 23:195,36712,240,6124,723,00002,113,536
4Jun 26, 2026 23:195,36712,195,2094,723,00002,113,536
5Jun 26, 2026 23:195,37912,236,1474,734,00002,113,536
6Jun 26, 2026 23:195,44612,234,6644,793,00002,113,536
7Jun 26, 2026 23:195,45312,229,6244,799,00002,113,536
8Jun 26, 2026 23:195,47312,686,0724,817,00002,113,536
9Jun 26, 2026 23:195,58612,747,7794,916,00002,113,536