牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

2008-06-24から1日間の記事一覧

SICP 1.2.2 Tree Recursion の Example: Counting change を Python でやってみた

SICP 1.2.2 Tree RecursionのCounting change を Python でやってみた def count_change(amount): return cc(amount, 5) def cc(amount, kinds_of_coins): if amount == 0: return 1 elif amount < 0 or kinds_of_coins == 0: return 0 return cc(amount, ki…