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:22Huy 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:1400000Error: expected "51114397153391 ", got "51114397152580 "
2Feb 18, 2024 13:2254,849117,891,43448,267,09302,244,608
3Feb 18, 2024 13:2254,890105,192,55948,303,37702,256,896
4Feb 18, 2024 13:2255,054121,230,61648,447,49602,244,608
5Feb 18, 2024 13:2258,50371,535,57450,474,0001,009,0002,281,472
6Feb 18, 2024 13:2258,68174,686,51450,627,0001,012,0002,519,040
7Feb 18, 2024 13:2258,74779,574,81151,697,00002,523,136
8Feb 18, 2024 13:2258,76381,703,04050,698,0001,013,0002,281,472
9Feb 18, 2024 13:2258,95280,917,45349,883,0001,995,0002,510,848
10Feb 18, 2024 13:2258,96479,649,45149,893,0001,995,0002,519,040
11Feb 18, 2024 13:2258,96984,191,95149,898,0001,995,0002,281,472
12Feb 18, 2024 13:2259,05074,647,73249,966,0001,998,0002,281,472
13Feb 18, 2024 13:2259,26973,584,65250,151,0002,006,0002,281,472