Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96864 王思颜 百钱买百鸡II C++ Wrong Answer 9 MS 272 KB 378 2024-11-09 17:17:41

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,s = 0; cin>>n; for (int x = 1;x <= n / 5;x++){ for (int y = 1;y <= n / 3;y++){ for (int z = 1;z <= n / 1;z++){ if(x+y+z == n && 5*x+3*y+z/5==n&&z%3==0){ cout<<x<<":"<<" "<<x<<","<<y<<","<<z<<endl; s = 1; } } } } if (s == 0){ cout<<"None"; } 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-----
9: 9,142,399 13: 13,135,402 17: 17,128,405 30: 30,106,414 34: 34,99,417 38: 38,92,420 51: 51,70,429 55: 55,63,432 59: 59,56,435 72: 72,34,444 76: 76,27,447 80: 80,20,450