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 23, 2024 03:56Yuriy 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
1Feb 23, 2024 03:5500000Error: expected "50997210436345 ", got "50997210436302 "stderr
2Feb 23, 2024 03:5628,11651,676,00924,742,00002,265,088
3Feb 23, 2024 03:5628,12052,122,53323,715,0001,031,0002,396,160
4Feb 23, 2024 03:5628,13850,481,29124,761,00002,506,752
5Feb 23, 2024 03:5628,25949,640,32522,879,0001,989,0002,527,232
6Feb 23, 2024 03:5628,27351,250,36622,890,0001,990,0002,383,872
7Feb 23, 2024 03:5628,30556,748,87322,916,0001,992,0002,383,872
8Feb 23, 2024 03:5628,35949,840,67322,960,0001,996,0002,387,968
9Feb 23, 2024 03:5628,43551,098,77523,022,0002,001,0002,392,064
10Feb 23, 2024 03:5628,46150,273,57723,043,0002,003,0002,383,872
11Feb 23, 2024 03:5628,81089,399,30925,352,83702,224,128
12Feb 23, 2024 03:5628,87596,228,89625,410,41002,232,320
13Feb 23, 2024 03:5628,94392,431,35425,470,04202,232,320