"I have tried my best……
but……
why……
it is TLE but not AC……"
#include<iostream>
#include<cmath>
using namespace std;
bool zhishu(long long m){
double a=sqrt(m);
if(m<=1) return false;
for(int i=2;i<=a;i++){
if(m%i==0) return false;
}
return true;
}
bool huiwen(long long m){
int a=m,b=0;
while(a>0){
b=10*b+a%10;
a=a/10;
}
if(m==b) return true;
else return false;
}
int main()
{
long a,b;
long long ans=0;
cin>>a>>b;
for(int i=a;i<=b;i++){
if(zhishu(i)==1&&huiwen(i)==1){
cout<<i<<endl;
}
}
return 0;
}