



def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase							):
    __a					=							[]
    __a					=							len(_UpperCAmelCase							)
    for i in range(_UpperCAmelCase							):
        __a					=							[]
        for j in range(_UpperCAmelCase							):
            __a					=							0
            for k in range(_UpperCAmelCase							):
                __a					=							val + matrix_a[i][k] * matrix_b[k][j]
            list_a.append(_UpperCAmelCase							)
        matrix_c.append(_UpperCAmelCase							)
    return matrix_c





def 	__snake_case      (     _UpperCAmelCase							):
    return [[int(row == column							) for column in range(_UpperCAmelCase							)] for row in range(_UpperCAmelCase							)]





def 	__snake_case      (     _UpperCAmelCase							):
    if n <= 1:
        return n
    __a					=							identity(2							)
    __a					=							[[1, 1], [1, 0]]
    __a					=							n - 1
    while n > 0:
        if n % 2 == 1:
            __a					=							multiply(_UpperCAmelCase  ,					_UpperCAmelCase							)
        __a					=							multiply(_UpperCAmelCase  ,					_UpperCAmelCase							)
        __a					=							int(n / 2							)
    return res_matrix[0][0]





def 	__snake_case      (     _UpperCAmelCase							):
    if n <= 1:
        return n
    __a					=							0
    __a					=							1
    for _ in range(2  ,					n + 1							):
        __a			,  __a					=							fiba, fiba + fiba
    return fiba





def 	__snake_case      (     ):
    for ordinal in "0th 1st 2nd 3rd 10th 100th 1000th".split():
        __a					=							int(''''''.join(c for c in ordinal if c in '''0123456789'''							)							)  # 1000th --> 1000
        print(
            f'{ordinal} fibonacci number using matrix exponentiation is '
            f'{nth_fibonacci_matrix(_UpperCAmelCase							)} and using bruteforce is '
            f'{nth_fibonacci_bruteforce(_UpperCAmelCase							)}\n'							)
    # from timeit import timeit
    # print(timeit("nth_fibonacci_matrix(1000000)",
    #              "from main import nth_fibonacci_matrix", number=5))
    # print(timeit("nth_fibonacci_bruteforce(1000000)",
    #              "from main import nth_fibonacci_bruteforce", number=5))
    # 2.3342058970001744
    # 57.256506615000035


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()










def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 9 / 5) + 32  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(float(_UpperCAmelCase							) + 2_73.15  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 9 / 5) + 4_91.67  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) - 32) * 5 / 9  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(((float(_UpperCAmelCase							) - 32) * 5 / 9) + 2_73.15  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(float(_UpperCAmelCase							) + 4_59.67  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(float(_UpperCAmelCase							) - 2_73.15  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(((float(_UpperCAmelCase							) - 2_73.15) * 9 / 5) + 32  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 9 / 5)  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) - 4_91.67) * 5 / 9  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round(float(_UpperCAmelCase							) - 4_59.67  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 5 / 9)  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 1.25 + 2_73.15)  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 2.25 + 32)  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 1.25)  ,					_UpperCAmelCase							)





def 	__snake_case      (     _UpperCAmelCase  ,					_UpperCAmelCase = 2							):
    return round((float(_UpperCAmelCase							) * 2.25 + 32 + 4_59.67)  ,					_UpperCAmelCase							)


if __name__ == "__main__":
 import doctest

 doctest.testmod()





