标签:col pre i++ span 欧拉 == turn bsp fine
1 #define MAXN 100000 2 int prime[MAXN],vis[MAXN]; 3 int db(int n) 4 { 5 int i,j; 6 int k=0; 7 for(i=2; i<=n; i++) 8 { 9 if(!vis[i]) prime[k++]=i; 10 for(j=0; j<k; j++) 11 { 12 if(prime[j]*i>n) break; 13 vis[prime[j]*i]=1; 14 if(i%prime[j]==0) break; 15 } 16 } 17 return k; 18 }
标签:col pre i++ span 欧拉 == turn bsp fine
原文地址:https://www.cnblogs.com/Asurudo/p/10352651.html