青蛙跳台阶

class Solution:
    def numWays(self, n: int) -> int:

        x, y = 1, 1
        for _ in range(n):
            x, y = y, x+y
        
        return x
原文地址:https://www.cnblogs.com/KbMan/p/14501514.html