正确答案

U2023029 2024-07-08 16:07:27

#include <bits/stdc++.h> using namespace std; int main() { for(int x=1;x<=50;x++) { for(int y=1;y<=50;y++) { for(int z=1;z<=50;z++) { if(3x+2y+z==50&&x+y+z==30) { cout<<x<<' '<<y<<' '<<z<<endl; } } } } return 0; }