简单题打卡
class Solution:
def buyChoco(self, prices: List[int], money: int) -> int:
a, b = inf, inf
for p in prices:
if p <= a:
b = a
a = p
elif p <= b:
b = p
return money - a - b if money >= a + b else money