先用篩法篩一段質數

接著再用篩法

平行篩你要的那一段

假設D = (U-L)

這樣時間複雜度約為

O( primes.size * lnD )

 

http://nopaste.csie.org/30058

文章標籤
全站熱搜
創作者介紹
創作者 robertanders 的頭像
robertanders

Robert Anderson's Blog

robertanders 發表在 痞客邦 留言(0) 人氣(0)