Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64234 张誉腾 百钱买百鸡II C++ Wrong Answer 6 MS 272 KB 391 2024-01-21 10:12:31

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,sum=1; cin >> n; for(int gj = 0; gj <= n/5; gj++) { for(int mj =0 ; mj <= n/3; mj++) { for(int jz =0 ; jz <= n; jz++) { if(gj + mj +jz == n && gj*5+mj*3+jz/3 == n&& jz %3 == 0) { cout<<sum<<":"<<" "<<gj<<","<<mj<<","<<jz<<endl; } } } sum++; } if(sum==0){ cout<<"None"; } }


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-----
3: 2,134,414 7: 6,127,417 11: 10,120,420 15: 14,113,423 19: 18,106,426 23: 22,99,429 27: 26,92,432 31: 30,85,435 35: 34,78,438 39: 38,71,441 43: 42,64,444 47: 46,57,447 51: 50,50,450 55: 54,43,453 59: 58,36,456 63: 62,29,459 67: 66,22,462 71: 70,15,465 75: 74,8,468 79: 78,1,471