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 listJul 6, 2026 03:09Victor MerckléVictor MerckléError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 6, 2026 03:12011,195,4903,423,00002,117,632expected "50931688383986 ", got "50932665144644 "stderr
2Jul 6, 2026 03:123,87811,201,3623,413,00002,117,632stderr
3Jul 6, 2026 03:123,88411,298,1763,418,00002,117,632stderr
4Jul 6, 2026 03:123,89211,296,0853,425,00002,117,632stderr
5Jul 6, 2026 03:123,89811,188,9563,431,00002,117,632stderr
6Jul 6, 2026 03:124,00211,267,1953,522,00002,117,632stderr
7Jul 6, 2026 03:124,03511,691,3123,551,00002,117,632stderr
8Jul 6, 2026 03:124,04311,668,0283,558,00002,117,632stderr
9Jul 6, 2026 03:124,05611,747,6993,570,00002,117,632stderr