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 21, 2026 11:40Johan SannemoJohan SannemoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 07:38M-Rochat10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 07:38012,517,96301,907,0002,121,728expected "6442459076 ", got "2147486898 "
2May 17, 2026 07:38012,238,05402,087,0002,121,728expected "6442459076 ", got "2147486898 "
3May 17, 2026 07:38013,006,05901,894,0002,121,728expected "6442459076 ", got "2147486898 "
4Jan 20, 2026 16:098,49827,269,5926,410,0001,068,0002,502,656
5Jan 20, 2026 16:008,50626,765,4786,416,0001,069,0002,502,656
6Jan 20, 2026 16:098,50628,791,2186,416,0001,069,0002,490,368
7Jan 20, 2026 16:098,50924,480,6305,349,0002,139,0002,281,472
8Jan 21, 2026 11:408,51426,509,5176,422,0001,070,0002,510,848
9Jan 20, 2026 16:098,51924,318,5216,426,0001,071,0002,502,656
10Jan 20, 2026 16:008,52425,681,9627,501,00002,285,568
11Jan 20, 2026 16:098,53224,131,8126,436,0001,072,0002,338,816
12Jan 20, 2026 16:008,53525,324,2786,438,0001,073,0002,498,560
13Jan 20, 2026 16:008,53923,251,8956,441,0001,073,0002,285,568
14Jan 20, 2026 16:098,55528,220,0657,528,00002,502,656
15Jan 20, 2026 16:098,55626,900,3926,454,0001,075,0002,494,464
16Jan 20, 2026 16:098,57827,872,3996,471,0001,078,0002,285,568
17Jan 20, 2026 16:008,59228,456,5027,561,00002,498,560
18Jan 20, 2026 16:008,59526,869,4396,484,0001,080,0002,285,568
19Jan 20, 2026 16:008,60324,252,4955,408,0002,163,0002,285,568
20Jan 21, 2026 11:408,60526,197,2216,491,0001,081,0002,285,568
21Jan 20, 2026 16:098,65523,355,3505,440,0002,176,0002,285,568
22Jan 20, 2026 16:008,66322,356,3956,534,0001,089,0002,285,568
23Jan 20, 2026 16:008,72725,941,7195,486,0002,194,0002,285,568
24Jan 21, 2026 11:408,73924,437,5345,493,0002,197,0002,285,568