We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果是等比数列求和,解法是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,不是太懂,望指教。
The text was updated successfully, but these errors were encountered:
因为f(0)=f(1)=1 少加了一个1
Sorry, something went wrong.
No branches or pull requests
如果是等比数列求和,解法是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,不是太懂,望指教。
The text was updated successfully, but these errors were encountered: