#include<bits/stdc++.h>
using namespace std;
bool abc(int x){
if(x==0||x==1)
return false;
for(int i=2;i<=x-1;i++)
if(x%i==0)
return false;
return true;
}
int main(){
int x;
scanf("%d",&x);
if(abc(x))
printf("yes");
else
printf("no");
}
判断质数_c++
最新推荐文章于 2024-09-15 11:40:06 发布