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 03:52M-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 03:53012,089,0951,005,00002,121,728expected "50844454376701 ", got "path=/mnt/hldata/data4193786633 n=64 first=163424006,694778633,1190944121,939268297,1771897443,711979766,682124210,1762364980,200504248,2028425133,825162907,873560086,1274871589,1451056620,1914475705,1308027173 "
2May 18, 2026 03:5309,952,1091,025,00002,121,728expected "51486687657686 ", got "path=/mnt/hldata/data1440686789 n=64 first=532559832,287301792,1599269922,1266135117,463993152,85397731,1097906016,912165076,1771696652,1391354588,2108050075,219694790,1346082150,1072175126,1982528628,1400184583 "
3May 18, 2026 03:5309,996,0591,013,00002,121,728expected "51254746732322 ", got "path=/mnt/hldata/data2297974249 n=64 first=953818809,325541542,107184342,1710538476,648104993,1503581960,2044729330,341654978,85021129,468583024,2006224802,290979768,1896253470,1909538564,1979572441,2145905452 "