#include<bits/stdc++.h>
using namespace std;
int l,r,t=0,s=0,p[10010]; bool f[100010];
bool check(int x){
int ans=0;
for(int i=x; i; i/=10)
ans=ans*10+i%10;
return !f[x]&&!f[ans];
}
int main(){
scanf("%d%d",&l,&r);
f[1]=1; f[0]=1;
for(int i=2; i<=1e5; i++){
if(!f[i]) p[++t]=i;
for(int j=1; j<=t&&i*p[j]<=1e5; j++){
f[i*p[j]]=1;
if(i%p[j]==0) break;
}
}
t=0;
for(int i=l; i<=r; i++)
if(check(i)) p[++t]=i;
for(int i=1; i<t; i++)
printf("%d,",p[i]);
printf("%d\n",p[t]);
return 0;
}
这是有什么地方填错了吗?第3个点WA了