You are viewing a single comment's thread. Return to all comments →
from itertools import product def get_money_spent(keyboards, drives, b): possible_sums = [ x + y for x,y in list(product(keyboards, drives)) if x + y <= b ] return max(possible_sums) if len(possible_sums) > 0 else -1
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →