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 3, 2026 02:59Victor 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 3, 2026 03:02012,222,0414,146,00002,117,632expected "51495865235507 ", got "51495880100628 "stderr
2Jul 3, 2026 03:024,57511,857,1644,026,00002,117,632stderr
3Jul 3, 2026 03:024,57611,843,5254,027,00002,117,632stderr
4Jul 3, 2026 03:024,69211,854,5214,129,00002,117,632stderr
5Jul 3, 2026 03:024,69412,193,6494,131,00002,117,632stderr
6Jul 3, 2026 03:024,69611,875,8134,133,00002,117,632stderr
7Jul 3, 2026 03:024,69612,207,3074,133,00002,117,632stderr
8Jul 3, 2026 03:024,70911,899,9224,144,00002,117,632stderr
9Jul 3, 2026 03:024,79611,980,1294,221,00002,117,632stderr