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 27, 2026 10:03Pavel 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 27, 2026 10:04055,679,12040,441,000986,0002,490,368expected "51237721249747 ", got "51238889506700 "
2Apr 27, 2026 10:0446,99757,687,32740,350,0001,008,0002,428,928
3Apr 27, 2026 10:0447,04057,313,47640,387,0001,009,0002,420,736
4Apr 27, 2026 10:0447,06159,344,20340,404,0001,010,0002,416,640
5Apr 27, 2026 10:0447,10556,557,86240,442,0001,011,0002,408,448
6Apr 27, 2026 10:0447,24758,998,16940,564,0001,014,0002,334,720
7Apr 27, 2026 10:0447,26160,288,82940,576,0001,014,0002,428,928
8Apr 27, 2026 10:0447,27958,683,10540,592,0001,014,0002,433,024
9Apr 27, 2026 10:0447,33655,643,03540,640,0001,016,0002,523,136