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 20, 2026 21:23Victor MerckléVictor MerckléScore: 21,942Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 21:2421,56943,489,07716,983,0001,998,0002,379,776stderr
2Apr 20, 2026 21:2421,86542,934,62718,230,0001,012,0002,375,680stderr
3Apr 20, 2026 21:2421,91143,487,33118,268,0001,014,0002,260,992stderr
4Apr 20, 2026 21:2421,93445,603,98719,302,00002,375,680stderr
5Apr 20, 2026 21:2421,94242,410,00218,293,0001,016,0002,371,584stderr
6Apr 20, 2026 21:2421,97340,712,66218,320,0001,017,0002,269,184stderr
7Apr 20, 2026 21:2422,01545,488,28718,355,0001,019,0002,383,872stderr
8Apr 20, 2026 21:2422,01553,297,04718,355,0001,019,0002,379,776stderr
9Apr 20, 2026 21:2422,35736,453,64718,640,0001,035,0002,273,280stderr