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 listFeb 18, 2024 13:13Huy Duc LeHuy Duc LeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 18, 2024 13:1900000Error: expected "51481538147881 ", got "51481538147120 "
2Feb 18, 2024 13:2055,507103,794,70848,846,29602,248,704
3Feb 18, 2024 13:1355,617111,439,93148,942,65602,252,800
4Feb 18, 2024 13:1355,669117,999,65048,988,44002,256,896
5Feb 18, 2024 13:1355,717115,592,16249,030,77802,256,896
6Feb 18, 2024 13:2055,780100,008,73949,086,37602,248,704
7Feb 18, 2024 13:2055,998103,148,36049,278,11102,256,896
8Feb 18, 2024 13:1358,64479,029,35250,596,0001,011,0002,281,472
9Feb 18, 2024 13:1358,74981,360,15351,699,00002,281,472
10Feb 18, 2024 13:1358,82576,839,57050,751,0001,015,0002,269,184
11Feb 18, 2024 13:1358,96076,694,62049,890,0001,995,0002,269,184
12Feb 18, 2024 13:1358,97873,853,05249,905,0001,996,0002,281,472
13Feb 18, 2024 13:1359,03675,296,57549,954,0001,998,0002,281,472
14Feb 18, 2024 13:1359,06672,980,45949,979,0001,999,0002,265,088
15Feb 18, 2024 13:1359,12378,838,30850,027,0002,001,0002,519,040
16Feb 18, 2024 13:1359,13980,300,15450,041,0002,001,0002,281,472