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 22, 2026 11:13Josu San MartinJosu San MartinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 22, 2026 11:15013,494,6606,042,00002,113,536expected "51299407330156 ", got "51299407329993 "
2Jun 22, 2026 11:156,69713,484,3935,894,00002,113,536
3Jun 22, 2026 11:156,72614,974,6755,919,00002,113,536
4Jun 22, 2026 11:156,80513,534,3305,989,00002,113,536
5Jun 22, 2026 11:156,81213,550,2855,995,00002,113,536
6Jun 22, 2026 11:156,84013,550,2256,020,00002,113,536
7Jun 22, 2026 11:156,89813,638,4976,071,00002,113,536
8Jun 22, 2026 11:156,90413,635,0736,076,00002,113,536
9Jun 22, 2026 11:157,10313,790,6456,251,00002,113,536