• + 0 comments

    in python

    def getTotalX(a, b):
        mcm_a = math.lcm(*a)
        i=1
        counter = 0
        while i*mcm_a <= min(b):
            div_b = True
            for b_ in b:
                if b_%(i*mcm_a)!=0:
                    div_b = False
            if div_b == True:
                counter+=1
            i+=1
        return counter