#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
bool s(int x)
{
int t = (x % 10) * 10 + x / 10;
for(int i = 2, j = 2;i * i <= x && j <= t;i++, j++)
{
if(x % i == 0 || t % j == 0)
{
return false;
}
}
return true;
}
int main()
{
int a, b;
cin >> a >> b;
for(int i = a;i < b;i++)
{
if(s(i))
{
cout << i <<endl;
}
}
return 0;
}
本人幼儿园, 不知道哪错了, 请求大蛇帮忙!!!