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 7, 2026 23:49Victor 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 7, 2026 23:52014,584,6817,109,00002,113,536expected "51236522286421 ", got "51238200561002 "
2Jun 7, 2026 23:528,05614,422,8677,090,00002,113,536
3Jun 7, 2026 23:528,06914,594,1117,101,00002,113,536
4Jun 7, 2026 23:528,07614,587,8557,107,00002,113,536
5Jun 7, 2026 23:528,08914,623,7397,119,00002,113,536
6Jun 7, 2026 23:528,15514,755,6617,177,00002,113,536
7Jun 7, 2026 23:528,17814,953,3307,197,00002,113,536
8Jun 7, 2026 23:528,18214,712,8207,201,00002,113,536
9Jun 7, 2026 23:528,18415,033,8097,202,00002,113,536