You are viewing a single comment's thread. Return to all comments →
python 3 lines.
def getTotalX(a, b): g = reduce(math.gcd, b) lcm = reduce(lambda x, y: (x * y) // math.gcd(x, y), a) return sum(g%l==0 for l in range(lcm, g+1, lcm))
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
python 3 lines.