# -- coding: utf-8 --
# 斐波那契数列
class solution:
def Fibonacci( n):
a,b=0,1
while n:
c=a+b
a=b
b=c
n-=1
return a
def Fibonacci_2(self,n):
if n<=0:
return 0
if n==1 or n==2:
return 1
else:
return self.Fibonacci(n-1)+self.Fibonacci(n-2)