leetcode70 python3 68ms 爬楼梯

def climbStairs(self, n):
    """
    :type n: int
    :rtype: int
    """
    a = 1
    b = 1
    for i in range(n):
        a, b = b, a + b
    return a
原文地址:https://www.cnblogs.com/theodoric008/p/9408209.html