链接 点击跳转 题解 真机智 设 f i f_i fi表示冠军打 i i i次需要的最少人数,则 f i = f i − 1 + f i − 2 f_i=f_{i-1}+f_{i-2} fi=fi−1+fi−2 只需要找最小的 i i i满足 f i ≥ n f_i \geq n fi≥n 代码 n = int(input()) a, b = 1, 2 ans = 1 while a+b<=n: ans += 1 a, b = b, a+b print(ans)