Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125901 | 陈华仁星 | 百钱买百鸡II | C++ | Wrong Answer | 48 MS | 268 KB | 344 | 2025-07-15 16:26:03 |
#include <iostream> #include <algorithm> using namespace std; int main() { int n,cnt=1; scanf("%d",&n); for(int i=0;i<=n/5;i++) { for(int j=0;j<=n/3;j++) { for(int k=0;k<=n;k++) { if(i+j+k==n&&i*5+j*3+k/3.0*1==n) { printf("%d: %d,%d,%d\n",cnt,i,j,k); cnt++; } } } } return 0; }
------Input------
10
------Answer-----
None
------Your output-----