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 listMay 16, 2026 20:13M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 20:28036,800,18625,086,0001,146,0002,113,536expected "51357591517135 ", got "51358958125512 "
2May 16, 2026 20:28034,867,15525,221,0001,039,0002,113,536expected "50758371426996 ", got "50758474430528 "
3May 16, 2026 20:28036,742,92925,095,0001,138,0002,113,536expected "51320476602080 ", got "51320954753848 "
4May 16, 2026 20:28034,827,78425,208,0001,031,0002,113,536expected "51427088892574 ", got "51427351872075 "
5May 16, 2026 20:2829,74036,951,88725,038,0001,134,0002,113,536
6May 16, 2026 20:2829,80734,860,24925,087,0001,144,0002,113,536
7May 16, 2026 20:2829,82134,844,61925,088,0001,155,0002,113,536
8May 16, 2026 20:2829,88534,851,12225,268,0001,031,0002,113,536
9May 16, 2026 20:2829,97735,074,09825,344,0001,036,0002,113,536