心愿愿星 @ 2017-07-30 22:35:29
#include<iostream>
using namespace std;
int main()
{float a,b,c;
int x,y,z,q[10],flag=0;
cin>>a>>b>>c;
for(x=123;c*x<1000;x++)
{y=x*b;z=x*c;
q[0]=x%10;q[1]=x/10%10;q[2]=(x-x%100)/100; q[3]=y%10;q[4]=y/10%10;q[5]=(y-y%100)/100; q[6]=z%10;q[7]=z/10%10;q[8]=(z-z%100)/100;
if((q[0]*q[1]*q[2]*q[3]*q[4]*q[5]*q[6]*q[7]*q[8]==362880)&&(q[0]+q[1]+q[2]+q[3]+q[4]+q[5]+q[6]+q[7]+q[8]==45))
{flag=1;
cout<<x<<" "<<y<<" "<<z<<endl;
}
}
if(!flag)cout<<"No!!!";
return 0;
}
by wangyuance @ 2017-08-06 20:03:58
_我也错了_
by xhx0809 @ 2017-11-27 20:19:25
2