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 5, 2026 05:58Victor 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 5, 2026 06:01011,926,5584,144,00002,117,632expected "51091165738548 ", got "51089018254919 "stderr
2Jul 5, 2026 06:014,42211,783,4733,892,00002,117,632stderr
3Jul 5, 2026 06:014,44011,742,6253,908,00002,117,632stderr
4Jul 5, 2026 06:014,46011,748,0533,925,00002,117,632stderr
5Jul 5, 2026 06:014,54712,072,7894,002,00002,117,632stderr
6Jul 5, 2026 06:014,54812,165,0374,003,00002,117,632stderr
7Jul 5, 2026 06:014,56413,148,4364,017,00002,117,632stderr
8Jul 5, 2026 06:014,57212,074,0184,024,00002,117,632stderr
9Jul 5, 2026 06:014,71811,917,8684,152,00002,117,632stderr