AC代码:
```cpp
#include <bits/stdc++.h>
using namespace std;
bool sushu(int n)
{
int j;
for(j=2;j*j<=n;j++)
{
if(n%j==0)
return false ;
}
return true;
}
bool huiwen(int n)
{
int y=0,x=n;
while(x)
{
y=y*10+x%10;
x/=10;
}
if(y==n)
{
return true;
}
return false;
}
int main()
{
int i,j,a,b;
cin>>a>>b;
for(i=a;i<=b;i++)
{
if (i % 2 == 0) {
continue;
}
if(huiwen(i))
{
if(sushu(i))
{
cout<<i<<endl;
}
}
}
}
```
by laoqiu_tyxx @ 2024-04-23 16:37:43