#include <iostream> using namespace std; int main() { for (int x = 1; x < 20; x++) { for (int y = 1; y < 33; y++) { int z = 100 - x - y; if (z % 3 == 0 && 5 * x + 3 * y + z / 3 == 100) { cout << x << " " << y << " " << z << endl; } } } return 0; } /************************************************************** Problem: 1022 User: admin Language: C++ Result: Accepted Time:4 ms Memory:2072 kb ****************************************************************/