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 listMay 16, 2026 20:38M-RochatM-RochatError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 20:41044,906,62733,875,0001,127,0002,113,536expected "51431219566570 ", got "51431760220979 "
2May 16, 2026 20:4139,72643,614,32633,822,0001,137,0002,113,536
3May 16, 2026 20:4139,72745,353,88233,838,0001,122,0002,113,536
4May 16, 2026 20:4139,74343,560,01333,836,0001,138,0002,113,536
5May 16, 2026 20:4139,75243,561,80833,956,0001,026,0002,113,536
6May 16, 2026 20:4139,76343,672,72233,884,0001,108,0002,113,536
7May 16, 2026 20:4139,77746,722,54833,866,0001,138,0002,113,536
8May 16, 2026 20:4139,80943,663,00433,884,0001,148,0002,113,536
9May 16, 2026 20:4139,84545,154,22333,913,0001,151,0002,113,536