• + 0 comments
    def getMoneySpent(keyboards, drives, b):
        max_val=0
        for i in keyboards:
            for j in drives:
                if(i+j<=b and max_val<i+j):
                    max_val=i+j
        return -1 if max_val==0 else max_val