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
|
2301 Discussions
|
Please Login in order to post a comment
Python: def getMoneySpent(keyboards, drives, b): return max([k+d for k in keyboards for d in drives if k+d<=b] or [-1])
Python 3
Kotlin solution
C# static int getMoneySpent(int[] keyboards, int[] drives, int b) { var expensiveOption = -1;
}
My solution in C: