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 listMay 17, 2026 18:32Josu San MartinJosu San MartinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 18:33011,504,7501,399,00002,121,728expected "51405743159795 ", got "0 "
2May 17, 2026 18:33011,065,3151,491,00002,121,728expected "51630945296946 ", got "0 "
3May 17, 2026 18:33010,394,1821,395,00002,121,728expected "50564121168061 ", got "0 "