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 29, 2022 02:28Yuriy 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
1Dec 29, 2022 02:2900000Error: expected "51277091961048 ", got "51277194639079 "stderr
2Dec 29, 2022 02:3000000Error: expected "51529280172945 ", got "51529287419752 "stderr
3Dec 29, 2022 02:2828,992100,875,01325,512,77602,228,224
4Dec 29, 2022 02:2829,06398,476,02225,575,36502,236,416
5Dec 29, 2022 02:2829,38288,938,25325,855,98702,240,512