工程與科技
大學
請問有沒有大神會翻成程式碼?
我看不懂
Sieve algorithm
1.1 What Is an Algorithm?
33
for p 2 to n do A[p] - P
for p < 2 to [n] do //see note before pseudocode
if A[p]+0 llp hasn't been eliminated on previous passes
jr p * P
while j < n do
A[j]0 //mark element as eliminated
j<j+ p
I/copy the remaining elements of A to array L of the primes
if( 0
for p + 2 to n do
if A[p] = 0
L[i] + A[p]
iki +1
return L
解答
尚無回答
您的問題解決了嗎?
看了這個問題的人
也有瀏覽這些問題喔😉
推薦筆記
【工程數學】『一階ODE』 完成
141
2
計算機程式-Part 1
107
0
Python 01 - 變數與資料型態
65
1
計算機程式-Part 3
57
0
計算機程式-Part 2
57
0
R程式語言
54
1
計算機概論
54
0
計算機程式-Part 4
53
0
Python初學筆記
46
0
電路學EP.02 電路分析方法
46
0