Nth prime by teebee

import java.util.*;enum N{N;System z;int i,j,k,a[]=new int[5<<16];{for(i=1;j<1e4;)if(a[++i]<1)for(k=a[++j]=i;k<2e5;a[k+=i]++);for(Scanner s=new Scanner(z.in);i>0;)z.out.println(a[s.nextInt()]);}}

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

download

return to the top page