一次可以跳一个,也可以跳n个
思考:在dp[n] = dp[n-1] + dp[n-2] + .. + dp[1] + 1(直接跳n)步骤 即dp[n]=∑n−1i=1dp[i]+1 class Solution: def find_ways(self,number): if number==1 or number ==2: return number ret=sum_=3 for i in range(number-2): ret=sum_+1 sum_+ =ret return ret