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 listJan 20, 2025 11:58matsuoka-601matsuoka-601Error
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Apr 24, 2026 17:53Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 24, 2026 17:53021,758,4314,605,0001,151,0002,502,656expected "11156247230561 ", got "11156245551722 "
2Apr 24, 2026 17:53020,192,1874,534,0001,133,0002,486,272expected "10971275166136 ", got "10971273492768 "
3Apr 24, 2026 17:53019,117,2753,486,0002,324,0002,322,432expected "11023089582270 ", got "11023087909326 "
4Jan 20, 2025 11:588,98824,813,8956,921,000988,0002,433,024
5Jan 20, 2025 11:588,99124,903,7104,945,0002,967,0002,318,336
6Jan 20, 2025 11:588,99822,680,9745,939,0001,979,0002,433,024