rnf5114 @ 2023-04-18 18:07:44
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,l,s,g=0;
bool flag;
cin>>n>>l;
if(n%2==0){
n++;
}
l=min(l,9999999);
for(int i=n;i<=l;i+=2){
g=0;
flag=1;
for(int j=2;j<=sqrt(i);j++){
if(i%j==0){
flag=0;
break;
}
}
if(flag){
s=i;
while(s){
g=g*10+s%10;
s/=10;
}
if(g==i){
cout<<g<<endl;
}
}
}
}
by hzoi_Shadow @ 2023-04-18 18:27:58
@liyong5114 先判回文再判素数