You are viewing a single comment's thread. Return to all comments →
Well, did it the pythonic 1 line way
def getMoneySpent(keyboards, drives, s): return max([sum([x,y]) for x in keyboards for y in drives if sum([x,y]) <= s]+[-1])
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
Well, did it the pythonic 1 line way