class Solution:
def change(self, amount: int, coins: List[int]) -> int:
d= [0 for i in range(amount+1)]
d[0] = 1
for v in coins:
for i in range(v, amount+1):
d[i] += d[i-v]
return d[amount]