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
posted @ 2018-08-02 16:57  一条图图犬  阅读(166)  评论(0编辑  收藏  举报