用户输出
962287892
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#80722 | #1288. 上楼梯(改) | Accepted | 100 | 74 ms | 396 K | C++ 11 (Clang) / 338 B | 15291309895 | 2022-08-02 12:04:35 |
#include <iostream>
#include <algorithm>
typedef unsigned long long ull;
using namespace std;
int main() {
int n;
cin >> n;
ull a = 1, b = 1, c = 1, temp;
for (ull i = 4; i < n; i++) {
temp = (a + b) % 998244353;
a = b;
b = c;
c = temp;
}
cout << c % 998244353 << endl;
return 0;
}