We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Electronics Shop
Electronics Shop
Sort by
recency
|
2436 Discussions
|
Please Login in order to post a comment
Mi solución en Python 3:
Python 2 pointers solution:
Python
def getMoneySpent(keyboards, drives, b): # # Write your code here. # prices=[] for i in range(len(keyboards)): price1=[keyboards[i]+drives[j] for j in range(len(drives)) if keyboards[i]+drives[j]<=b] prices.extend(price1) if prices!=[]: old=max(prices) else :old=-1
return old