• + 0 comments
    python3
    
    def divisor(n):
        div = []
        for i in range(1,n+1):
            if i == 1 or i == n:
                div.append(i)
            else:
                if n % i == 0:
                    div.append(i)
        
        return div
        
    def restaurant(l,b):
        # Write your code here
        divl = divisor(l)
        divb = divisor(b)
        common = []
        for i in divl:
            if i in divb:
                common.append(i)
                
        maximum = max(common)
        total = int((l/maximum)*(b/maximum))
        return total