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:39013,071,4661,001,00002,121,728expected "50997756714935 ", got "path=/mnt/hldata/data216872163 n=64 first=2046113659,1151899032,288509442,2102755487,599664351,753473643,155030415,1337757296,1768701641,321857680,811158145,1601596883,427661666,1256922213,854582374,310335676 "
2May 18, 2026 04:3909,888,2041,009,00002,121,728expected "51258316330423 ", got "path=/mnt/hldata/data3891472802 n=64 first=853365080,280042852,187068753,2045901566,172622747,119256125,1632883270,1999271905,544725997,328934932,1714512367,1300465037,1299496331,429622566,795006904,1420007357 "
3May 18, 2026 04:3909,857,1931,012,00002,121,728expected "51338772621017 ", got "path=/mnt/hldata/data2751425984 n=64 first=189430,1354689196,1668339309,2065324372,1279364922,847703890,2071669976,826914134,958556267,702288254,822696028,622411572,2096021286,1072509540,83355488,1112591573 "