import time
import math

def fib3(n):

   for i in range(100001):
        phi=((1 + (math.sqrt(5)))/2)
        return int( ( ((phi)**n) - ((-1)**n)/ ((phi)**n) ) //(math.sqrt(5)))

n=40
t1=time.time()
a=fib2(n)
t2=time.time()
print ("fib2(%d) = %d: %fs" % (n, a, t2-t1))

cdbacbdd7116d376b9ce645952e5955ab2f8b8f1
<mask token>


def fib3(n):
    for i in range(100001):
        phi = (1 + math.sqrt(5)) / 2
        return int((phi ** n - (-1) ** n / phi ** n) // math.sqrt(5))


<mask token>

<mask token>


def fib3(n):
    for i in range(100001):
        phi = (1 + math.sqrt(5)) / 2
        return int((phi ** n - (-1) ** n / phi ** n) // math.sqrt(5))


<mask token>
print('fib2(%d) = %d: %fs' % (n, a, t2 - t1))

<mask token>


def fib3(n):
    for i in range(100001):
        phi = (1 + math.sqrt(5)) / 2
        return int((phi ** n - (-1) ** n / phi ** n) // math.sqrt(5))


n = 40
t1 = time.time()
a = fib2(n)
t2 = time.time()
print('fib2(%d) = %d: %fs' % (n, a, t2 - t1))

import time
import math


def fib3(n):
    for i in range(100001):
        phi = (1 + math.sqrt(5)) / 2
        return int((phi ** n - (-1) ** n / phi ** n) // math.sqrt(5))


n = 40
t1 = time.time()
a = fib2(n)
t2 = time.time()
print('fib2(%d) = %d: %fs' % (n, a, t2 - t1))

import time
import math

def fib3(n):

   for i in range(100001):
        phi=((1 + (math.sqrt(5)))/2)
        return int( ( ((phi)**n) - ((-1)**n)/ ((phi)**n) ) //(math.sqrt(5)))

n=40
t1=time.time()
a=fib2(n)
t2=time.time()
print ("fib2(%d) = %d: %fs" % (n, a, t2-t1))
