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 listApr 29, 2026 11:16Dominique GarmierDominique GarmierError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 29, 2026 11:17024,548,6867,041,0002,011,0002,326,528expected "51091356678978 ", got "51091356678973 "
2Apr 29, 2026 11:1710,17123,920,6736,962,0001,989,0002,363,392
3Apr 29, 2026 11:1710,17627,226,6986,965,0001,990,0002,371,584
4Apr 29, 2026 11:1710,23528,929,9137,006,0002,001,0002,441,216
5Apr 29, 2026 11:1710,25328,546,4227,018,0002,005,0002,465,792
6Apr 29, 2026 11:1710,27328,568,2887,032,0002,009,0002,371,584
7Apr 29, 2026 11:1710,27926,497,9117,036,0002,010,0002,416,640
8Apr 29, 2026 11:1710,28426,278,5217,039,0002,011,0002,322,432
9Apr 29, 2026 11:1710,31430,477,9487,060,0002,017,0002,367,488