Nth prime by schpey

c,j,p[9999];main(i){for(;c<9999&&++i;j-c||(p[c++]=i))for(j=0;p[j]&&i%p[j++];);for(;~scanf("%d",&c);printf("%d\n",p[c-1]));}

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

download

return to the top page