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 4, 2026 08:35Victor 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 4, 2026 08:38012,148,9364,360,00002,117,632expected "51405692189748 ", got "51405692446747 "stderr
2Jul 4, 2026 08:384,76412,060,6614,193,00002,117,632stderr
3Jul 4, 2026 08:384,79512,019,2834,220,00002,117,632stderr
4Jul 4, 2026 08:384,81112,081,6014,234,00002,117,632stderr
5Jul 4, 2026 08:384,88112,409,6064,296,00002,117,632stderr
6Jul 4, 2026 08:384,89212,040,8604,305,00002,117,632stderr
7Jul 4, 2026 08:384,89312,168,2804,306,00002,117,632stderr
8Jul 4, 2026 08:384,89312,096,3764,306,00002,117,632stderr
9Jul 4, 2026 08:384,89612,068,2464,309,00002,117,632stderr