def f(n, arg1=0, arg2=1, arg3=1): while n >0: arg3 = arg1 + arg2 i = arg3 - arg2 print(i) arg1, arg2 = arg2, arg1 + arg2 n -= 1 return f(n, arg1, arg2) f(1)
时间: 2024-11-20 13:43:23
def f(n, arg1=0, arg2=1, arg3=1): while n >0: arg3 = arg1 + arg2 i = arg3 - arg2 print(i) arg1, arg2 = arg2, arg1 + arg2 n -= 1 return f(n, arg1, arg2) f(1)