6 条题解

  • 2
    @ 2025-11-29 15:42:10

    包AC

    #include<bits/stdc++.h>
    using namespace std;
    long long x,y,z,a[10000],b[10000];
    int main(){
    	cin >> x >> y >> z;
    	for(int i=1; i<=x; i++){
    		a[i]=1;
    	} 
    	for(int i=x+1; i<=z+1; i++){
    		a[i]=b[i-2]+a[i-1];
    		b[i]=y*a[i-x];
    	}
    	cout << a[z+1];
    	return 0;
    }
    

    信息

    ID
    1266
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    244
    已通过
    88
    上传者