Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64762 夏轩淇 百钱买百鸡II C++ Wrong Answer 546 MS 276 KB 356 2024-01-21 17:37:45

Tests(9/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,s=1,c=0; cin>>n; for(int x=0;x<=n;x++){ for(int y=0;y<=n;y++){ for(int z=0;z<=n;z++){ if(x+y+z==n&&x*5+y*3+z/3==n&&z%3==0){ printf("%d: %d,%d,%d\n",s,x,y,z); s++; c=1; } } } } if(c==0){ cout<<"no"; } return 0; }


Run Info:

------Input------
10
------Answer-----
None
------Your output-----
no