Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113623 | 黎瑾萱 | 百钱买百鸡II | C++ | Accepted | 37 MS | 272 KB | 358 | 2025-03-16 11:44:30 |
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int x,y,z; int m=0; for(int x=0;x<=n/5;x++){ for(int y=0;y<=n/3;y++){ for(int z=0;z<=n;z++){ if(x+y+z==n && 5*x+3*y+(1.0/3)*z==n){ m++; cout<<m<<": "<<x<<","<<y<<","<<z<<endl; } } } } if(m==0){ cout<<"None"; } return 0; }