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 10:39Victor 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 10:42012,004,6784,004,00002,117,632expected "51062063394252 ", got "51062063253179 "stderr
2Jul 3, 2026 10:42011,682,9543,902,00002,117,632expected "51022825325737 ", got "51022825283850 "stderr
3Jul 3, 2026 10:42011,693,4983,903,00002,117,632expected "51440062684997 ", got "51440062684390 "stderr
4Jul 3, 2026 10:424,42011,686,9983,890,00002,117,632stderr
5Jul 3, 2026 10:424,45411,677,7073,920,00002,117,632stderr
6Jul 3, 2026 10:424,53611,681,1943,992,00002,117,632stderr
7Jul 3, 2026 10:424,55311,845,9874,007,00002,117,632stderr
8Jul 3, 2026 10:424,64611,831,7444,089,00002,117,632stderr
9Jul 3, 2026 10:424,74712,005,3574,178,00002,117,632stderr