きったんの頭

#! /usr/bin/env python3
"""
pe31.py
https://mind.kittttttan.info/py/pe31
"""

def pe31(target=200):
    """
    How many different ways can L2 be made using any number of coins?
    """
    coins = [1, 2, 5, 10, 20, 50, 100, 200]
    ways = [1] + [0] * target
    for coin in coins:
        for i in range(coin, target + 1):
            ways[i] += ways[i - coin]
    print(ways[target])

if __name__ == "__main__":
    pe31()