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 20:02Pavel 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 20:05036,209,31325,205,00002,117,632expected "51101834297481 ", got "51102239288081 "
2May 25, 2026 20:0528,46134,022,86225,046,00002,117,632
3May 25, 2026 20:0528,46733,307,55325,051,00002,117,632
4May 25, 2026 20:0528,54334,677,33125,118,00002,117,632
5May 25, 2026 20:0528,56434,962,24424,137,0001,000,0002,117,632
6May 25, 2026 20:0528,56535,684,56725,138,00002,117,632
7May 25, 2026 20:0528,63435,838,90425,198,00002,117,632
8May 25, 2026 20:0528,65532,794,37025,217,00002,117,632
9May 25, 2026 20:0528,66836,735,73725,228,00002,117,632