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 listApr 27, 2026 10:10Pavel SkripkinPavel SkripkinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 10:13046,899,01333,275,0001,008,0002,433,024expected "50939145859491 ", got "50939902065124 "
2Apr 27, 2026 10:1338,90351,400,84734,235,00002,428,928
3Apr 27, 2026 10:1338,95556,984,16833,273,0001,008,0002,428,928
4Apr 27, 2026 10:1338,99046,098,86333,303,0001,009,0002,433,024
5Apr 27, 2026 10:1339,03046,956,42733,337,0001,010,0002,437,120
6Apr 27, 2026 10:1339,05453,009,74433,358,0001,010,0002,433,024
7Apr 27, 2026 10:1339,05951,844,44133,362,0001,010,0002,330,624
8Apr 27, 2026 10:1339,10549,810,72933,401,0001,012,0002,428,928
9Apr 27, 2026 10:1339,21546,843,89933,495,0001,015,0002,433,024