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 31, 2022 14:20Robert BurkeRobert BurkeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 31, 2022 14:2000000Error: expected "51083779368199 ", got "51083779366458 "stderr
2Jul 31, 2022 14:2036,60699,531,84632,212,98902,277,376
3Jul 31, 2022 14:2036,83990,161,75832,418,56502,281,472
4Jul 31, 2022 14:2036,887100,564,87632,460,78202,281,472
5Jul 31, 2022 14:2038,56158,207,51832,936,000998,0002,285,568
6Jul 31, 2022 14:2038,65659,703,62231,016,0003,001,0002,453,504
7Jul 31, 2022 14:2038,79457,046,79632,131,0002,008,0002,535,424
8Jul 31, 2022 14:2038,82059,296,90731,148,0003,014,0002,445,312
9Jul 31, 2022 14:2038,83156,826,91232,161,0002,010,0002,449,408
10Jul 31, 2022 14:2038,88062,473,78732,202,0002,012,0002,441,216
11Jul 31, 2022 14:2038,98854,482,85533,300,0001,009,0002,273,280
12Jul 31, 2022 14:2039,10255,157,02132,386,0002,024,0002,535,424
13Jul 31, 2022 14:2039,10359,039,23832,387,0002,024,0002,293,760