Totient by *yuko*

begin repeat var i,k,n:comp=2;read(k);n:=k;repeat n:=n-ord(k mod i=0)*n div i;while
k mod i=0do k:=k div i;i:=i+1until i*i>k;writeln(n-n div k+1div k*n)until 0>0end.

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

download

return to the top page