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 14:46olliecrowolliecrowError
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 14:47029,590,7349,517,0001,189,0002,457,600expected "51298950473935 ", got "51298950473838 "
2Apr 29, 2026 14:4711,92632,533,5878,396,0002,099,0002,457,600
3Apr 29, 2026 14:4711,95524,609,0409,469,0001,052,0002,334,720
4Apr 29, 2026 14:4711,96227,800,7359,475,0001,052,0002,457,600
5Apr 29, 2026 14:4711,97525,724,4249,485,0001,053,0002,449,408
6Apr 29, 2026 14:4711,98526,583,4879,493,0001,054,0002,330,624
7Apr 29, 2026 14:4712,01127,502,7389,513,0001,057,0002,543,616
8Apr 29, 2026 14:4712,02329,277,2559,523,0001,058,0002,453,504
9Apr 29, 2026 14:4712,32026,996,3168,871,0001,971,0002,490,368