<doocs>0322.Coin Change_1.py
def coinChange( coins: List[int], amount: int) -> int:
    dp = [amount + 1] * (amount + 1)
    dp[0] = 0
    for coin in coins:
        for j in range(coin, amount + 1):
            dp[j] = min(dp[j], dp[j - coin] + 1)
    return -1 if dp[-1] > amount else dp[-1]
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
    var_5 = [ var_3 + 1 ] * ( var_3 + 1 )
    var_5 [ 0 ] = 0
    for var_7 in var_0 :
        for var_9 in range ( var_7 , var_3 + 1 ) :
            var_5 [ var_9 ] = min ( var_5 [ var_9 ] , var_5 [ var_9 - var_7 ] + 1 )
    return - 1 if var_5 [ - 1 ] > var_3 else var_5 [ - 1 ]
