```
class Solution(object):
def coinChange(self, coins, amount):
"""
:type coins: List[int]
:type amount: int
:rtype: int
"""
n = len(coins)
maxCount = 1+int(amount*1.0/min(coins))
dp = [0]
for j in range(1, amount+1):
dp += [maxCount]
for i in range(n):
if j >= coins[i]:
dp[j] = min(dp[j], dp[j-coins[i]]+1)
return dp[-1] if dp[-1]!= maxCount else -1
```

why this one runtime exceed limit?