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 25, 2026 19:55Pavel SkripkinPavel SkripkinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 25, 2026 19:58034,771,00525,008,00002,117,632expected "51114875434007 ", got "51115081291044 "
2May 25, 2026 19:5828,50433,079,97925,084,00002,117,632
3May 25, 2026 19:5828,55733,845,93325,131,00002,117,632
4May 25, 2026 19:5828,64233,875,74925,205,00002,117,632
5May 25, 2026 19:5828,65234,795,11625,214,00002,117,632
6May 25, 2026 19:5828,65332,813,42725,215,00002,117,632
7May 25, 2026 19:5828,70540,473,83224,260,0001,001,0002,117,632
8May 25, 2026 19:5828,70534,903,09025,261,00002,117,632
9May 25, 2026 19:5828,79634,428,50825,341,00002,117,632