Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
92684 sh25_shenpy 昆虫繁殖 C++ 解答错误 0 MS 244 KB 359 2026-07-18 18:10:23

Tests(1/10):


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


测评信息: