lianzhilu @ 2021-09-14 10:43:19
#include <iostream>
using namespace std;
int judge(int *num)
{
for(int i = 0;i < 9; i++){
if(!num[i]) return 0;
for(int j = 0; j < 9; j++){
if(num[i] == num[j] && i!= j) return 0;
}
}
return 1;
}
void seperate(int *num, int n, int x)
{
int i = 0;
while(n > 0){
num[3*x+i] = n%10;
i++;
n /= 10;
}
}
int main()
{
int A, B, C, flag = 1;
int num[9];
cin >> A >> B >> C;
int m = 100/A, n = 1000/C;
for(int i = m+1; i < n; i++){
seperate(num, i*A, 0);
seperate(num, i*B, 1);
seperate(num, i*C, 2);
if(judge(num)){
cout << i*A<< " " << i*B << " " << i*C << endl;
flag = 0;
}
}
if(flag) cout << "No!!!";
}