Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97434 | 孙睿阳 | 百钱买百鸡II | C++ | Time Limit Exceeded | 1000 MS | 272 KB | 304 | 2024-11-15 21:20:41 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m=0; cin>>n; int x,y,z; for(x=0;x<=n;x++){ for(y=0;y<=n;y++){ for(z=0;z<=n;z++){ if(z%3==0&&n==(5*x)+(3*y)+(z/3)&&n==x+y+z){ m++; printf("%d: %d,%d,%d\n",m,x,y,z); } } } } return 0; }