Calculating value of totient function for n
i = 2 NEW_LINE while i * i <= n : NEW_LINE INDENT if ( n % i == 0 ) : NEW_LINE INDENT res -= ( res // i ) NEW_LINE while ( n % i == 0 ) : NEW_LINE INDENT n //= i NEW_LINE DEDENT DEDENT i += 1 NEW_LINE DEDENT if ( n != 1 ) : NEW_LINE INDENT res -= ( res // n ) NEW_LINE DEDENT return res NEW_LINE