c20191623 @ 2017-08-18 16:51:22
#include<stdio.h>
int check(int t1,int t2,int t3)
{
int temp1=45,res;
long temp2,a1,a2,b1,b2,c1,c2;
temp2=362880;
a1=t1%10+t1/10%10+t1/100%10;
b1=t2%10+t2/10%10+t2/100%10;
c1=t3%10+t3/10%10+t3/100%10;
a2=(t1%10)*(t1/10%10)*(t1/100%10);
b2=(t2%10)*(t2/10%10)*(t2/100%10);
c2=(t3%10)*(t3/10%10)*(t3/100%10);
if(((a1+b1+c1)==temp1) && (a2*b2*c2==temp2))
res=1;
else
res=0;
return res;
}
int main()
{
int x,num=0,a,b,c,jc=0;
scanf("%d%d%d",&a,&b,&c);
for(x=100;x<1000;x++)
if(check(a*x,b*x,c*x)==1)
{
printf("%d %d %d\n",a*x,b*x,c*x);
jc=1;
}
if(jc==0)
printf("No!!!\n");
}