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 03:01Yuriy 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 03:0000000Error: expected "50885771673459 ", got "50885771672842 "stderr
2Dec 29, 2022 03:0100000Error: expected "51255161538314 ", got "51255161538271 "stderr
3Dec 29, 2022 03:0128,13351,013,51023,726,0001,031,0002,265,088
4Dec 29, 2022 03:0128,28056,856,93323,891,000995,0002,387,968
5Dec 29, 2022 03:0128,28853,093,78923,898,000995,0002,383,872
6Dec 29, 2022 03:0128,29750,794,88424,901,00002,392,064
7Dec 29, 2022 03:0128,30151,940,46922,913,0001,992,0002,527,232
8Dec 29, 2022 03:0128,31155,777,13022,921,0001,993,0002,510,848
9Dec 29, 2022 03:0128,32455,013,64723,928,000997,0002,392,064
10Dec 29, 2022 03:0128,42652,857,77624,015,0001,000,0002,265,088
11Dec 29, 2022 03:0128,50251,408,88123,076,0002,006,0002,265,088
12Dec 29, 2022 03:0128,92180,399,99725,450,20202,228,224
13Dec 29, 2022 03:0128,96491,604,91725,488,63702,232,320
14Dec 29, 2022 03:0129,15585,652,38125,656,67502,228,224