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 listDec 19, 2024 13:17zielajzielajError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 19, 2024 13:1600000Error: expected "51082814597197 ", got "51082814597190 "stderr
2Dec 19, 2024 13:174,60519,625,4003,039,0001,013,0002,535,424
3Dec 19, 2024 13:174,60722,369,9613,041,0001,013,0002,535,424
4Dec 19, 2024 13:174,61619,585,4743,047,0001,015,0002,494,464
5Dec 19, 2024 13:174,61921,785,2903,049,0001,016,0002,535,424
6Dec 19, 2024 13:174,64326,899,5373,065,0001,021,0002,494,464
7Dec 19, 2024 13:174,66525,083,3673,079,0001,026,0002,494,464
8Dec 19, 2024 13:174,81122,747,8812,117,0002,117,0002,490,368
9Dec 19, 2024 13:174,81422,835,9303,177,0001,059,0002,498,560
10Dec 19, 2024 13:174,83419,362,1452,127,0002,127,0002,535,424