摘要:
#include<bits/stdc++.h> #define maxn 100000010 using namespace std; int x; int cnt,isprime[maxn],mindiv[maxn]; bool notprime[maxn]; void shai(int n){ 阅读全文
posted @ 2021-02-03 08:02
DReamLion
阅读(80)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> #define maxn 1000010 using namespace std; int x; int cnt,isprime[maxn]; bool notprime[maxn]; void shai(int n){ for(int i=2;i<= 阅读全文
posted @ 2021-02-03 07:58
DReamLion
阅读(74)
评论(0)
推荐(0)
摘要:
时间复杂度O(√n) #include<bits/stdc++.h> #include<iostream> using namespace std; int n; int main(){ cin>>n; if(n<2){ cout<<"Not Prime"<<endl; return 0; } fo 阅读全文
posted @ 2021-02-03 00:07
DReamLion
阅读(52)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> using namespace std; int x,cntd,d[510]; int cnt,isprime[510],ci[510];//isprime存因数,ci存每个因数出现的次数 void chai(int n){ for(int i=2;i 阅读全文
posted @ 2021-02-03 00:05
DReamLion
阅读(1028)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> using namespace std; int x,cnt; int p[10010],ci[10010];//p存因数,ci存每个因数出现的次数 void chai(int n){ for(int i=2;i*i<=n;i++){ if(n%i== 阅读全文
posted @ 2021-02-03 00:04
DReamLion
阅读(53)
评论(0)
推荐(0)

浙公网安备 33010602011771号