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 1, 2026 18:31Victor 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 1, 2026 18:34011,899,2484,197,00002,117,632expected "51470277266894 ", got "51470643799215 "stderr
2Jul 1, 2026 18:344,63811,818,5884,082,00002,117,632stderr
3Jul 1, 2026 18:344,76311,910,1664,192,00002,117,632stderr
4Jul 1, 2026 18:344,77011,870,0084,198,00002,117,632stderr
5Jul 1, 2026 18:344,77212,170,6684,200,00002,117,632stderr
6Jul 1, 2026 18:344,77511,933,6374,202,00002,117,632stderr
7Jul 1, 2026 18:344,87512,079,3704,290,00002,117,632stderr
8Jul 1, 2026 18:344,92512,309,9784,334,00002,117,632stderr
9Jul 1, 2026 18:344,94012,331,9394,348,00002,117,632stderr