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 21, 2026 10:24Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 14:16M-Rochat10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 14:45014,748,1134,207,00002,117,632expected "6442459076 ", got "2147491785 "
2May 17, 2026 14:45016,181,0584,216,00002,117,632expected "6442459076 ", got "2147491785 "
3May 17, 2026 14:45013,219,0124,231,00002,117,632expected "6442459076 ", got "2147491785 "
4Apr 21, 2026 10:2519,49539,423,75115,138,0002,018,0002,408,448
5Apr 21, 2026 10:2519,64242,583,68516,269,0001,016,0002,379,776
6Apr 21, 2026 10:2519,67334,061,33916,295,0001,018,0002,371,584
7Apr 21, 2026 10:2519,70149,596,97616,318,0001,019,0002,375,680
8Apr 21, 2026 10:2519,73144,670,47916,343,0001,021,0002,375,680
9Apr 21, 2026 10:2519,73643,573,51016,347,0001,021,0002,269,184
10Apr 21, 2026 10:2519,75638,648,97016,364,0001,022,0002,269,184
11Apr 21, 2026 10:2519,82237,594,96316,418,0001,026,0002,269,184
12Apr 21, 2026 10:2519,83032,574,55316,425,0001,026,0002,265,088