pat春季考試 乙級性感素數 成功ac 使用了埃氏刪選法

#include <bits/stdc++.h> using namespace std; const int maxsize=10000000; bool prime[maxsize]={false};//默認都是素數 int main() { int n; cin>>n; prime[1]=true;//不是素數 for(int i=2;i<maxsize;++i)
相關文章
相關標籤/搜索