Palindromic prime by nn

#import<ios>
main(){for(int i,x,y,n=1;i=n++<2e4;y%=i-n||printf("%d\n",n))for(x=n;x?y=10*y+x%10:y%++i;)x/=10;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page