boolcheck(int x, int y, int z){ bool used[10] = {}; for (int num : {x, y, z}) { for (int i = 0; i < 3; ++i) { int d = num % 10; if (d == 0 || used[d]) returnfalse; used[d] = true; num /= 10; } } returntrue; }
intmain(){ int A, B, C; cin >> A >> B >> C;
if (A == 0) { cout << "No!!!\n"; return0; }
bool found = false; for (int x = 123; x <= 987; ++x) { int y = x * B / A; int z = x * C / A;
// 整数除法可能截断:反向检查等比例关系 if (y * A != x * B || z * A != x * C) continue; if (y < 100 || y > 999 || z < 100 || z > 999) continue;
if (check(x, y, z)) { cout << x << ' ' << y << ' ' << z << '\n'; found = true; } } if (!found) cout << "No!!!\n"; }