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 18, 2026 04:38M-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 18, 2026 04:40011,516,5311,015,00002,121,728expected "51159765939317 ", got "path=/mnt/hldata/data897971093 n=64 first=226071673,1242444208,680745442,150513087,1853653255,51115912,665251112,2075595568,814957515,691368147,214846043,516361925,245436804,455108911,1234751319,106924017 "
2May 18, 2026 04:4009,840,5791,009,00002,121,728expected "51387887951746 ", got "path=/mnt/hldata/data2048555379 n=64 first=1593297899,520968782,1122221250,1490061247,1284388007,1421297402,1296883447,1564394595,416786161,508461161,1854933698,419204728,1305705779,2124170562,1576815748,1976970378 "
3May 18, 2026 04:4009,903,0281,009,00002,121,728expected "51530334894842 ", got "path=/mnt/hldata/data2706069974 n=64 first=1458022433,110639899,1055163335,1540672431,1490573022,1574974240,1413592736,1998685035,1022446738,1511497188,552295061,2096614802,1030508691,132625759,1890432564,2829207 "