各位大神,我这里哪里出错了呀,,

#找零兑换的动态规划

#不知道哪里出错了!!!!!!老是提示 第6行 'int' object is not subscriptable

  1. def dpMakeChange(coinValueList,change,minCoins,coinsUsed):
  2.     for cents in range(1,change+1):
  3.         coinCount = cents
  4.         newCoin = 1
  5.         for j in [c for c in coinValueList if c <= cents]:
  6.             if minCoins[cents - j] + 1 < coinCount:
  7.                 coinCount = minCoins[cents - j] + 1 
  8.                 newCoin = j
  9.         minCoins = coinCount
  10.         coinsUsed[cents] = newCoin
  11.     return minCoins[change]
  12.  
  13. print(dpMakeChange([1,5,10,21,25],63,[0] * 63))
  14.  

你第9行赋值给minCoins为coinCount了