def fib(n):
a, b = 1, 1
while a < n:
print(a, end=' ')
a, b = b, a + b fib(100000) #输出结果
#1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025
2023-11-28 21:50:22
def fib(n):
a, b = 1, 1
while a < n:
print(a, end=' ')
a, b = b, a + b fib(100000) #输出结果
#1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025