Interview-code-practice-python icon indicating copy to clipboard operation
Interview-code-practice-python copied to clipboard

变态青蛙跳问题.py

Open kyuer opened this issue 6 years ago • 1 comments

如果是等比数列求和,解法是2^n - 1 return 2**n-1 ,与正确答案不符合。 所以f(n)=f(n-1)+f(n-2)+...+f(1)+f(0) 因为f(n-1)=f(n-2)+f(n-3)+...+f(1)+f(0) f(0)=1,不是太懂,望指教。

kyuer avatar Aug 30 '18 03:08 kyuer

因为f(0)=f(1)=1 少加了一个1

Simon717 avatar Apr 10 '19 01:04 Simon717