题目
代码
class Solution {
public:
int numWays(int n) {
int a = 1, b = 1;
while(n--) {
int c = (a + b) % 1000000007;
a = b;
b = c;
}
return a;
}
};
原创文章,作者:745907710,如若转载,请注明出处:https://blog.ytso.com/245615.html