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 listJun 23, 2026 16:48anboto1anboto1Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 23, 2026 16:49016,925,0016,745,0001,211,0002,117,632expected "51108799587862 ", got "193362317210848 "
2Jun 23, 2026 16:49016,908,9616,763,0001,219,0002,117,632expected "50923779496649 ", got "194511655382372 "
3Jun 23, 2026 16:49016,928,6746,732,0001,224,0002,117,632expected "51254595011694 ", got "194955169900017 "