摘要: 1.递归 # 递归 def fibs(n): if n < 1: return 0 elif n == 1: return 1 return fibs(n - 2) + fibs(n - 1) print(fibs(6)) 2.循环 # 循环 def fibs(n): a = [1, 1] for 阅读全文
posted @ 2017-09-28 22:40 回冬 阅读(750) 评论(0) 推荐(0) 编辑