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 29, 2026 14:40Victor 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 29, 2026 14:42012,349,8134,423,00002,113,536expected "51195860323111 ", got "51196652468840 "
2Jun 29, 2026 14:424,82312,021,5074,245,00002,113,536
3Jun 29, 2026 14:424,84811,990,1864,267,00002,113,536
4Jun 29, 2026 14:424,91012,000,1544,321,00002,113,536
5Jun 29, 2026 14:424,94812,355,8604,355,00002,113,536
6Jun 29, 2026 14:424,95612,302,2704,362,00002,113,536
7Jun 29, 2026 14:424,96712,316,9204,371,00002,113,536
8Jun 29, 2026 14:425,04012,071,3654,436,00002,113,536
9Jun 29, 2026 14:425,07912,240,8014,470,00002,113,536