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 21, 2021 18:33Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 24, 2021 00:2500000Error: expected "51334565248165 ", got "51336017158406 "
2Jun 24, 2021 00:2500000Error: expected "50989369163361 ", got "50989850800742 "
3Jun 24, 2021 00:2400000Error: expected "51015418629201 ", got "51016439910489 "
4Jun 24, 2021 00:2400000Error: expected "51120817043150 ", got "51121061805207 "
5Jun 24, 2021 00:2400000Error: expected "50907903672276 ", got "50908993966124 "
6Jun 23, 2021 23:1300000Error: expected "51004408725861 ", got "51004408725814 "
7Jun 21, 2021 18:3338,930117,662,78434,258,61802,224,128
8Jun 23, 2021 23:1438,97295,262,35634,295,10802,220,032
9Jun 23, 2021 23:1438,97291,388,89834,295,31902,215,936
10Jun 24, 2021 00:2839,00295,719,29834,321,52602,211,840
11Jun 21, 2021 18:3339,01588,404,81534,333,31502,220,032
12Jun 24, 2021 00:2839,015112,101,32634,333,04602,215,936
13Jun 21, 2021 18:4039,06193,914,13134,373,33602,203,648
14Jun 21, 2021 18:3339,06490,907,66634,376,06002,215,936
15Jun 23, 2021 23:1439,097102,401,98834,405,20302,224,128
16Jun 24, 2021 00:2839,11887,537,61734,423,80902,228,224
17Jun 21, 2021 18:4039,12696,660,76234,431,10802,215,936
18Jun 21, 2021 18:4039,127100,318,60734,431,44902,228,224
19Jun 23, 2021 23:1443,99563,977,18838,716,00002,269,184
20Jun 21, 2021 18:4044,00967,124,11537,709,0001,019,0002,269,184
21Jun 21, 2021 18:3344,18172,582,81436,886,0001,993,0002,375,680
22Jun 24, 2021 00:2844,19368,668,61538,890,00002,269,184
23Jun 23, 2021 23:1444,19469,776,07437,894,000997,0002,375,680
24Jun 21, 2021 18:3344,19871,570,98436,900,0001,994,0002,269,184
25Jun 24, 2021 00:2844,20063,901,70537,899,000997,0002,363,392
26Jun 24, 2021 00:2844,20064,795,04438,896,00002,269,184
27Jun 21, 2021 18:3344,20171,510,64938,897,00002,269,184
28Jun 21, 2021 18:3344,20166,711,51837,900,000997,0002,375,680
29Jun 21, 2021 18:4044,20166,321,43437,900,000997,0002,269,184
30Jun 21, 2021 18:4044,21864,152,45937,915,000997,0002,506,752
31Jun 24, 2021 00:2844,23262,925,74637,926,000998,0002,469,888
32Jun 21, 2021 18:4044,24067,156,58636,935,0001,996,0002,269,184
33Jun 21, 2021 18:4044,26865,041,27137,958,000998,0002,269,184
34Jun 23, 2021 23:1444,27465,989,22736,963,0001,998,0002,269,184
35Jun 21, 2021 18:4044,27667,746,11337,964,000999,0002,269,184
36Jun 23, 2021 23:1444,28066,616,44937,967,000999,0002,375,680
37Jun 23, 2021 23:1444,28170,529,62136,969,0001,998,0002,269,184
38Jun 21, 2021 18:4044,28363,679,76637,970,000999,0002,371,584
39Jun 24, 2021 00:2844,28870,166,63336,975,0001,998,0002,269,184
40Jun 24, 2021 00:2844,28964,828,76536,976,0001,998,0002,269,184
41Jun 23, 2021 23:1444,32567,909,93137,006,0002,000,0002,269,184
42Jun 21, 2021 18:3344,32867,853,81437,009,0002,000,0002,269,184
43Jun 24, 2021 00:2844,33565,246,14337,015,0002,000,0002,269,184
44Jun 21, 2021 18:4044,34168,279,60138,020,0001,000,0002,379,776
45Jun 23, 2021 23:1444,34367,474,85137,021,0002,001,0002,269,184
46Jun 23, 2021 23:1444,34968,282,95538,027,0001,000,0002,363,392
47Jun 21, 2021 18:3344,36664,387,03738,041,0001,001,0002,269,184
48Jun 21, 2021 18:3344,38271,053,03037,054,0002,002,0002,269,184
49Jun 24, 2021 00:2844,39266,484,12237,062,0002,003,0002,269,184
50Jun 21, 2021 18:3344,39962,252,05637,068,0002,003,0002,269,184
51Jun 21, 2021 18:3344,41366,464,93838,081,0001,002,0002,379,776
52Jun 21, 2021 18:4044,43364,816,30437,096,0002,005,0002,367,488
53Jun 24, 2021 00:2844,43364,653,55037,096,0002,005,0002,383,872
54Jun 23, 2021 23:1444,43663,557,14937,099,0002,005,0002,269,184