Skip to content

Commit 80f9f28

Browse files
authored
Update design-an-atm-machine.py
1 parent f46235f commit 80f9f28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/design-an-atm-machine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def withdraw(self, amount):
2323
:type amount: int
2424
:rtype: List[int]
2525
"""
26-
result = [0]*5
26+
result = [0]*len(self.__cnt)
2727
for i in reversed(xrange(len(self.__vals))):
2828
result[i] = min(amount//self.__vals[i], self.__cnt[i])
2929
amount -= result[i]*self.__vals[i]

0 commit comments

Comments
 (0)