#include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,mall=0;
cin>>a>>b>>c;
for(int i=123;i<=333;i++)
{
int x[3],y[3],z[3];
x[0]=a*i/100;
x[1]=a*i/10%10;
x[2]=a*i%10;
//
y[0]=b*i/100;
y[1]=b*i/10%10;
y[2]=b*i%10;
//
z[0]=c*i/100;
z[1]=c*i/10%10;
z[2]=c*i%10;
if(x[0]+x[1]+x[2]+y[0]+y[1]+y[2]+z[0]+z[1]+z[2]==45&&x[0]*x[1]*x[2]*y[0]*y[1]*y[2]*z[0]*z[1]*z[2]==1*2*3*4*5*6*7*8*9)
{
cout<<x[0]<<x[1]<<x[2]<<' ';
cout<<y[0]<<y[1]<<y[2]<<' ';
cout<<z[0]<<z[1]<<z[2]<<' ';
cout<<endl;
mall=1;
}
}
if(mall==0) cout<<"No!!!";
return 0;
}
貌似是#7测试点(in:123 456 789;put:123 456 789)有问题
万分感谢