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 23, 2026 19:01Victor 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 23, 2026 19:04012,447,7314,604,00002,113,536expected "51385162288701 ", got "51385106509904 "
2Jun 23, 2026 19:045,06111,930,2974,454,00002,113,536
3Jun 23, 2026 19:045,06911,908,2574,461,00002,113,536
4Jun 23, 2026 19:045,07711,998,8054,468,00002,113,536
5Jun 23, 2026 19:045,17112,013,7284,551,00002,113,536
6Jun 23, 2026 19:045,18212,033,6734,561,00002,113,536
7Jun 23, 2026 19:045,18512,018,8014,563,00002,113,536
8Jun 23, 2026 19:045,20612,341,5574,582,00002,113,536
9Jun 23, 2026 19:045,21812,349,7354,592,00002,113,536