from math import gcd def totient(a): """python 3.6.0""" return len([b for b in range(a) if (gcd(a, b) == 1)])
- from math import gcd
- def totient(a):
out = 0for b in range(a):if(gcd(a, b) == 1):out += 1return outdef gcd(a, b):while b != 0:(a, b) = (b, a % b)return a- """python 3.6.0"""
- return len([b for b in range(a) if (gcd(a, b) == 1)])