Practical Numbers by Patashu

class P{static{for(int n=1,f=1,g=1;n<501;n+=f=g=1){for(int m=2;m<n;m++){if(1>n%m)f+=m;if(m>f)g=0;}if(g>0)System.out.println(n);}}}

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

download

return to the top page