啊题解
2025-04-15 18:03:12
发布于:四川
23阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int x, y, z;
cin >> x >> y >> z;
long long a[55] = {}, b[55] = {};
for(int i = 1; i <= x; i++) a[i] = 1;
for(int i = x + 1; i <= z + 1; i++) {
a[i] = a[i - 1] + b[i - 2];
b[i] = a[i - x] * y;
}
cout << a[z + 1];
return 0;
}
这里空空如也
有帮助,赞一个