- C++
软件上过了,但在网站上样例都没过
- 2025-3-15 20:25:24 @
#include<bits/stdc++.h>
using namespace std;
int a,b;
bool c=true;
bool man(int d){
if(d==1){
return false;
}
bool e=true;
for(int i=2;i<d;i++){
if(d%i==0){
return false;
}
}
if(e==true){
if(d/10!=0){
man(d/10);
}
}
else{
return true;
}
}
int main(){
cin>>a>>b;
for(int i=a;i<=b;i++){
c=man(i);
if(c==true){
cout<<i<<endl;
}
c=true;
}
}
第 2746 幸运素数
0 条评论
目前还没有评论...