Totient by not

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

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

download

return to the top page