mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-18 18:14:34 +08:00
psf/black code formatting (#1277)
This commit is contained in:

committed by
Christian Clauss

parent
07f04a2e55
commit
9eac17a408
@ -5,6 +5,8 @@ Can you determine number of ways of making change for n units using
|
||||
the given types of coins?
|
||||
https://www.hackerrank.com/challenges/coin-change/problem
|
||||
"""
|
||||
|
||||
|
||||
def dp_count(S, m, n):
|
||||
|
||||
# table[i] represents the number of ways to get to amount i
|
||||
@ -23,6 +25,6 @@ def dp_count(S, m, n):
|
||||
return table[n]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
print(dp_count([1, 2, 3], 3, 4)) # answer 4
|
||||
print(dp_count([2, 5, 3, 6], 4, 10)) # answer 5
|
||||
|
Reference in New Issue
Block a user