You are viewing a single comment's thread. Return to all comments →
def getTotalX(a, b): lcma = math.lcm(*a) gcdb = math.gcd(*b) if gcdb % lcma != 0: return 0 factors = [i*lcma for i in range(1, gcdb // lcma+1) if gcdb % (i*lcma) == 0] return len(factors)
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →