当前位置:网站首页>Leecode70 climbing stairs

Leecode70 climbing stairs

2022-06-21 21:11:00 Tea mile


'''  A total of  n  rank ,n >= 0;  You can climb at one time  1  or  2  A stair ;  Ask climb  n  How many kinds of climbing methods are there ( The emphasis is bold , It's about climbing , It doesn't count to go ) '''
#  Violence solution 
def climbStairs(n):
    if n == 0 or n == 1:
        return 1
    return climbStairs(n 
原网站

版权声明
本文为[Tea mile]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211908266673.html