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 listJan 20, 2026 10:20Johan SannemoJohan SannemoScore: 16,770Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 20, 2026 10:2016,73630,249,36513,676,0001,052,0002,351,104
2Jan 20, 2026 10:2016,74441,032,72314,735,00002,289,664
3Jan 20, 2026 10:2016,74432,313,37812,630,0002,105,0002,482,176
4Jan 20, 2026 10:2016,75038,811,47313,688,0001,052,0002,289,664
5Jan 20, 2026 10:2016,77035,546,60813,704,0001,054,0002,281,472
6Jan 20, 2026 10:2016,93433,700,41412,915,0001,987,0002,453,504
7Jan 20, 2026 10:2016,93431,852,86113,909,000993,0002,347,008
8Jan 20, 2026 10:2016,94732,812,53913,919,000994,0002,281,472
9Jan 20, 2026 10:2016,96032,808,19412,935,0001,990,0002,289,664