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 listJun 19, 2021 20:33alex3dalex3dError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2021 20:3100000Error: expected "50929265410420 ", got "50929265410415 "
2Jun 19, 2021 20:3232,25151,511,14627,368,0001,013,0002,289,664
3Jun 19, 2021 20:3332,26655,495,98728,394,00002,289,664
4Jun 19, 2021 20:3532,27555,844,21127,388,0001,014,0002,269,184
5Jun 19, 2021 20:3232,28550,093,77727,397,0001,014,0002,510,848
6Jun 19, 2021 20:3232,31755,599,47227,424,0001,015,0002,289,664
7Jun 19, 2021 20:3332,31750,931,16827,424,0001,015,0002,289,664
8Jun 19, 2021 20:3332,36050,767,95928,477,00002,289,664
9Jun 19, 2021 20:3532,36551,437,84827,464,0001,017,0002,289,664
10Jun 19, 2021 20:3532,37553,139,16727,473,0001,017,0002,289,664
11Jun 19, 2021 20:3232,39554,491,59927,490,0001,018,0002,289,664
12Jun 19, 2021 20:3232,40855,104,73727,501,0001,018,0002,523,136
13Jun 19, 2021 20:3532,40949,972,15627,502,0001,018,0002,277,376
14Jun 19, 2021 20:3332,41651,970,35427,508,0001,018,0002,289,664
15Jun 19, 2021 20:3532,41651,528,23427,508,0001,018,0002,289,664
16Jun 19, 2021 20:3532,43159,382,93927,520,0001,019,0002,289,664
17Jun 19, 2021 20:3232,45651,144,62928,561,00002,523,136
18Jun 19, 2021 20:3232,47650,098,23127,559,0001,020,0002,289,664
19Jun 19, 2021 20:3332,48849,384,88928,589,00002,289,664
20Jun 19, 2021 20:3532,49152,066,98327,571,0001,021,0002,289,664
21Jun 19, 2021 20:3332,49553,057,69927,575,0001,021,0002,527,232
22Jun 19, 2021 20:3532,52349,805,45627,598,0001,022,0002,523,136
23Jun 19, 2021 20:3232,54348,902,08727,616,0001,022,0002,289,664
24Jun 19, 2021 20:3332,56650,374,35527,635,0001,023,0002,289,664
25Jun 19, 2021 20:3232,58256,477,05727,648,0001,024,0002,289,664
26Jun 19, 2021 20:3332,59759,568,78527,661,0001,024,0002,269,184
27Jun 19, 2021 20:3532,60955,824,03327,672,0001,024,0002,269,184
28Jun 19, 2021 20:3332,63555,320,78126,739,0001,980,0002,269,184
29Jun 19, 2021 20:3533,85398,343,97229,790,54702,244,608
30Jun 19, 2021 20:3333,86396,065,96429,799,11102,252,800
31Jun 19, 2021 20:3533,90493,552,68029,835,76602,256,896
32Jun 19, 2021 20:3333,91594,638,68229,845,23602,244,608
33Jun 19, 2021 20:3233,92089,612,02429,849,78502,252,800
34Jun 19, 2021 20:3533,92194,745,54329,850,27902,244,608
35Jun 19, 2021 20:3233,968108,769,91729,891,62402,252,800
36Jun 19, 2021 20:3233,98590,565,99329,906,98502,244,608
37Jun 19, 2021 20:3334,06893,765,44829,980,23002,252,800