結果 : recursive algorithm in python