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 29, 2026 15:56olliecrowolliecrowError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 29, 2026 15:56032,111,4859,483,0001,053,0002,330,624expected "51216318839972 ", got "51216318839905 "
2Apr 29, 2026 15:5611,80327,459,7819,349,0001,038,0002,326,528
3Apr 29, 2026 15:5611,82029,438,1299,362,0001,040,0002,326,528
4Apr 29, 2026 15:5611,84628,487,4659,383,0001,042,0002,342,912
5Apr 29, 2026 15:5611,85731,119,2989,392,0001,043,0002,338,816
6Apr 29, 2026 15:5611,87029,337,3179,402,0001,044,0002,338,816
7Apr 29, 2026 15:5611,87729,710,3699,407,0001,045,0002,342,912
8Apr 29, 2026 15:5611,94729,457,56810,514,00002,330,624
9Apr 29, 2026 15:5611,99431,544,4959,500,0001,055,0002,338,816