Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125909 | 刘轻松 | 百钱买百鸡II | C++ | Accepted | 28 MS | 268 KB | 328 | 2025-07-15 16:31:22 |
#include<iostream> using namespace std; int main(){ int n,cnt=0; cin>>n; 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){ cnt++; printf("%d: %d,%d,%d\n",cnt,x,y,z); } } } } if(cnt==0){ cout<<"None"; } return 0; }