Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147754 罗迎甲 百钱买百鸡II C++ Wrong Answer 4 MS 272 KB 443 2026-02-07 15:09:03

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n=0; int a=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/3;z++){ if(x+y+z*3==n&&x*5+y*3+z==n){ a++; cout<<a<<": "<<x<<','<<y<<','<<z<<endl; } } } } if(a==0) cout<<"None"<<endl; return 0; }


Run Info:

------Input------
550
------Answer-----
1: 2,134,414 2: 6,127,417 3: 10,120,420 4: 14,113,423 5: 18,106,426 6: 22,99,429 7: 26,92,432 8: 30,85,435 9: 34,78,438 10: 38,71,441 11: 42,64,444 12: 46,57,447 13: 50,50,450 14: 54,43,453 15: 58,36,456 16: 62,29,459 17: 66,22,462 18: 70,15,465 19: 74,8,468 20: 78,1,471
------Your output-----
1: 2,134,138 2: 6,127,139 3: 10,120,140 4: 14,113,141 5: 18,106,142 6: 22,99,143 7: 26,92,144 8: 30,85,145 9: 34,78,146 10: 38,71,147 11: 42,64,148 12: 46,57,149 13: 50,50,150 14: 54,43,151 15: 58,36,152 16: 62,29,153 17: 66,22,154 18: 70,15,155 19: 74,8,156 20: 78,1,157