1833. Maximum Ice Cream Bars
Содержание
class Solution:
def maxIceCream(self, costs: List[int], coins: int) -> int:
costs.sort()
for i, c in enumerate(costs):
if coins < c:
return i
coins -= c
return len(costs)