class Solution:
def maxIceCream(self, costs: List[int], coins: int) -> int:
minimum = min(costs)
answer = 0 # counting for counting
i = 0
if coins < minimum:
return 0
costs.sort()
while i < len(costs) and coins >= costs[i]:
coins -= costs[i]
i += 1
answer += 1
return answer