标签:des style blog class code c
5 500
5 7 11 101 131 151 181 191 313 353 373 383#include<stdio.h> #include<string.h> int a[10000001]; int huwu(int n) { int m=0,t=n; while(t) { m=m*10+t%10; t/=10; } if(m==n) return 1; return 0; } int prime(int n) { if(n==2)return 1; for(int i=2; i*i<=n; i++) if(n%i==0) return 0; return 1; } int main() { int n,m; while(scanf("%d%d",&n,&m)>0) { for(;n<=m&&n<=9989899;n++) if(huwu(n)) if(prime(n)) printf("%d\n",n); printf("\n"); } }
标签:des style blog class code c
原文地址:http://blog.csdn.net/u010372095/article/details/25655005