machenchang @ 2024-10-02 20:51:01
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,x,y,z,s;
cin>>x>>y>>z;
for(int i=123;i<=333;i++){
a=i;
a=i*x;
b=i*y;
c=i*z;
if((a/100+a/10%10+a%10+b/100+b/10%10+b%10+c/100+c/10%10+c%10==1+2+3+4+5+6+7+8+9)&&((a/100)*(a/10%10)*(a%10)*(b/100)*(b/10%10)*(b%10)*(c/100)*(c/10%10)*(c%10)==1*2*3*4*5*6*7*8*9)){
cout<<a<<" "<<b<<" "<<c<<endl;
s++;
}
}
if(s==0){
cout<<"No!!!";
}
return 0;
}