class Solution: def Fibonacci(self, n): # write code here a, b = 0, 1 while n > 0: b = a + b a = b - a n -= 1 return a
本文标题:【递归循环】斐波那契数列
本文链接:https://www.haomeiwen.com/subject/afmgjctx.html
网友评论