题目
代码
执行用时:32 ms, 在所有 Python3 提交中击败了76.05% 的用户
内存消耗:15 MB, 在所有 Python3 提交中击败了36.66% 的用户
通过测试用例:51 / 51
class Solution:
def numWays(self, n: int) -> int:
a,b=1,1
for i in range(2,n+1):
a,b=b,a+b
return b%1000000007