Totient by Debanjan

r;n;main(i){for(;~scanf("%d",&n);printf("%d\n",r-r/n?:r))for(r=n,i=2;n%i?n/i++/i:(n/=i)%i?r-=r/i:1;);}

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

download

return to the top page