5 条题解
-
3赵晨希@吴江区实验初中 (赵晨希) LV 8 @ 2021-01-08 19:49:22
#include <iostream>
#include <cmath>
using namespace std;int main()
{
int x;
cin>>x;
int n=sqrt(x);
int x1=2;
while(x1<=n)
{
if(x%x1==0)
break;
x1=x1+1;
}
if(x1<=n)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
} -
12023-08-05 00:47:16@
#include <bits/stdc++.h>
using namespace std;int main(){int n,i=2;cin>>n;for (;ii<=n;i++)if(!(n%i)){i=0;break;}if(i&&n!=1)cout<<"Yes";else cout<<"No";}//**请勿模仿** -
02021-01-16 21:15:15@
#include <iostream> #include <cmath> using namespace std; int main() { int x; cin>>x; int n=sqrt(x); int x1=2; while(x1<=n) { if(x%x1==0) break; x1=x1+1; } if(x1<=n) cout<<"No"<<endl; else cout<<"Yes"<<endl; return 0; }
-
-22021-01-25 16:03:52@
#include <iostream>
using namespace std;
int main()
{
int a,b=2;
cin>>a;while(b<=a-1)
{
if(a%b==0)
break;
b++ ;
}if(b<a)
cout<<"No";
else
if(a!=1)
cout<<"Yes";
else
cout<<"No";return 0;
} -
-52021-01-10 19:33:07@
#include <iostream>
using namespace std;int main()
{
int x;
cin>>x;
int x1=2;
int b=0;
while(x1<x)
{
if( x%x1==0 )
;
x1=x1+1;
b++;
}
if(b==2)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}
- 1
信息
- 难度
- 7
- 分类
- (无)
- 标签
- 递交数
- 4916
- 已通过
- 909
- 通过率
- 18%
- 被复制
- 8
- 上传者