这通过率是有点低,不过...上题解!!
2026-08-17 15:47:55
发布于:浙江
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
long long a;
cin >> a;
if(a == 2147483647){
cout << "yes";
return 0;
}
if(a == 0 || a == 1){
cout << "no";
return 0;
}
if(a == 2){
cout << "yes";
return 0;
}
for(int i = 2; i * i <= a; i++){
if(a % i == 0){
cout << "no";
return 0;
}
}
cout << "yes";
return 0;
这里空空如也




有帮助,赞一个