cbd先生 @ 2020-02-12 11:13:20
#include<iostream>
using namespace std;
int main()
{
int a,b,c,A,B,C;
cin>>A>>B>>C;
bool flag=false;
for(a=0;a<999;a++)
{
b=(B/A)*a;
c=(C/A)*a;
if(b>999||c>999)
{
continue;
}
if((a%10+a/10%10+a/100+b%10+b/10%10+b/100+c%10+c/10%10+c/100==1+2+3+4+5+6+7+8+9)&&((a%10)*(a/10%10)*(a/100)*(b%10)*(b/10%10)*(b/100)*(c%10)*(c/10%10)*(c/100)==1*2*3*4*5*6*7*8*9))
{
flag=true;
cout<<a<<" "<<b<<" "<<c<<endl;
}
}
if(!flag)
{
cout<<"No!!!"<<endl;
}
return 0;
}