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 listSep 29, 2026 08:47NicoNicoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 29, 2026 08:480742,404,313730,856,0001,087,0002,113,536expected "51362815290519 ", got "18446744073010949271 "
2Sep 29, 2026 08:480739,301,864727,906,0001,069,0002,113,536expected "51214375922148 ", got "1185884644 "
3Sep 29, 2026 08:480736,606,675725,088,0001,007,0002,113,536expected "50832229403105 ", got "1291454945 "