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:41012,217,8541,003,00002,121,728expected "51330589669197 ", got "path=/mnt/hldata/data420049975 n=64 first=1131418152,216827077,658614446,1285108350,555877995,1560718056,535015352,997608802,2076549404,853235325,350025259,892643640,644395553,2061542914,1567006788,661291936 "
2May 18, 2026 04:4109,936,1251,013,00002,121,728expected "50915207015710 ", got "path=/mnt/hldata/data740702344 n=64 first=1345647634,373720417,818268527,1512199077,1205242352,1470107205,1284316160,842469673,1842825770,1077248499,335047493,1992085114,1716581530,1323149400,82535055,618256237 "
3May 18, 2026 04:4109,864,6521,009,00002,121,728expected "50643420063843 ", got "path=/mnt/hldata/data1284587894 n=64 first=1908334250,253647455,474665049,156907910,714738579,1980399956,1328316915,984329274,1634180907,1584093031,1805674299,1205631948,1476662401,1662560714,1408010920,1283658557 "