Skip to content

变态青蛙跳问题.py #3

Description

@kyuer

如果是等比数列求和,解法是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,不是太懂,望指教。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions