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 30, 2026 10:27olliecrowolliecrowError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 30, 2026 10:28017,348,2709,776,0001,086,0002,330,624expected "51051044943766 ", got "51051044943677 "
2Apr 30, 2026 10:2811,91224,023,6609,435,0001,048,0002,572,288
3Apr 30, 2026 10:2812,02617,213,28310,583,00002,445,312
4Apr 30, 2026 10:2812,10517,195,3129,588,0001,065,0002,334,720
5Apr 30, 2026 10:2812,14017,192,0339,616,0001,068,0002,551,808
6Apr 30, 2026 10:2812,15617,256,0499,510,0001,188,0002,445,312
7Apr 30, 2026 10:2812,20217,255,5679,665,0001,073,0002,334,720
8Apr 30, 2026 10:2812,29617,343,0279,739,0001,082,0002,334,720
9Apr 30, 2026 10:2812,30917,208,4249,749,0001,083,0002,535,424