文章
33
粉丝
78
获赞
3
访问
19.0k
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
int n;
while(cin >> n){
int flag = 0;
if(n == 1){
cout << "no"<<endl;
flag = 1;
}
for(int i = 2;i <= sqrt(n);i++){
if(n%i == 0){
cout << "no"<<endl;
flag = 1;
break;
}
}
if(flag == 0)
cout <<"yes"<<endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发