Tchaikovsky @ 2016-10-31 15:43:32
#include<iostream>
using namespace std;
int main()
{
bool bb=0;
int a[4],b[4],c[4],x1,x2,x3;
cin>>x1>>x2>>x3;
float m=x2/x1,n=x3/x1;
for(int i=123;i<=333;i++)
{
a[1]=i/100;
a[2]=i/10%10;
a[3]=i%100%10;
b[1]=int(i*m)/100;
b[2]=int(i*m)/10%10;
b[3]=int(i*m)%100%10;
c[1]=int(i*n)/100;
c[2]=int(i*n)/10%10;
c[3]=int(i*n)%100%10;
if((a[1]+a[2]+a[3]+b[1]+b[2]+b[3]+c[1]+c[2]+c[3]==45)&&(a[1]*a[2]*a[3]*b[1]*b[2]*b[3]*c[1]*c[2]*c[3]==362880))
{
cout<<i<<" "<<i*m<<" "<<i*n<<endl;
bb=1;
}
}
if(bb==0) cout<<"No!!!";
return 0;
}
by 中2少年雷耶斯 @ 2016-11-12 21:58:12
第五个点输入
123 456 789
输出
123 456 789
by zhutianlu0317 @ 2016-12-01 12:54:18
what!
by ytoworld @ 2017-02-14 20:33:30
+1。一脸懵逼的看着测试数据。。。求大神指教`