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 listOct 3, 2026 05:40Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2026 05:41015,347,0322,395,0002,381,0002,121,728expected "51038700646067 ", got "2147483044000026500 "
2Oct 3, 2026 05:41015,248,4692,390,0002,392,0002,121,728expected "51488276077430 ", got "2147482436000026500 "
3Oct 3, 2026 05:41015,285,7182,386,0002,403,0002,121,728expected "50908547053416 ", got "2147483002000031499 "