Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
86597 sh25_zhangyy 百鸡问题 C++ 通过 0 MS 244 KB 305 2026-04-03 15:42:43

Tests(2/2):


#include <bits/stdc++.h> using namespace std; int main() { int x, y, z, n, m, cnt=0; cin >> x >> y >> z >> n >> m; for(int i=0;i<=n/x;i++) { for(int j=0;j<=(n-x*i)/y;j++) { int k=(n-x*i-y*j)*z; if(i+j+k==m) cnt+=1; } } cout << cnt; return 0; }


测评信息: