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 listApr 26, 2026 20:28Pavel 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
1Apr 26, 2026 20:28055,393,79934,920,0001,995,0002,428,928expected "51229340190273 ", got "51230140960658 "
2Apr 26, 2026 20:28054,236,07436,288,0001,008,0002,330,624expected "51099592703423 ", got "51099601759924 "
3Apr 26, 2026 20:28054,256,02535,074,0002,004,0002,424,832expected "51305933358806 ", got "51306441272354 "
4Apr 26, 2026 20:2842,13856,402,80535,078,0002,004,0002,416,640
5Apr 26, 2026 20:2842,17254,528,20735,106,0002,006,0002,486,272
6Apr 26, 2026 20:2842,20157,527,80636,134,0001,003,0002,428,928
7Apr 26, 2026 20:2842,36551,943,77836,275,0001,007,0002,424,832
8Apr 26, 2026 20:2842,37059,015,48136,279,0001,007,0002,420,736
9Apr 26, 2026 20:2842,38552,992,11336,291,0001,008,0002,420,736