文章
68
粉丝
691
获赞
26
访问
577.5k
#define ll int
#define vec vector<ll>
#define inf 0x3f3f3f3f
#define MAX 10005
#define MOD 2333333
int a1[MAX], a2[MAX];
int main() {
int n;
a1[1] = 1, a2[1] = 0;
while (cin >> n) {
for (int i = 2; i <= n; i++) {
a1[i] = (a1[i - 1] + a2[i - 1]) % MOD;
a2[i] = a1[i - 1];
}
cout << (a1[n] + a2[n]) % MOD << endl;
}
}
登录后发布评论
暂无评论,来抢沙发