SVIP2007126 @ 2018-10-17 20:21:02
using namespace std;
int main()
{ bool f=false;
int a,b,c,i,j,k;
cin>>a>>b>>c;
for(i=(123/a+min(123%a,1))*a;i<=987/a*a;i=i+a)
{
j=i/a*b;
k=i/a*c;
if(j>=100&&j<=999&&k>=100&&k<=999)
{
int l[10],sum=0,xx=1;
l[1]=i/100;
l[2]=i/10%10;
l[3]=i%10;
l[4]=j/100;
l[5]=j/10%10;
l[6]=j%10;
l[7]=k/100;
l[8]=k/10%10;
l[9]=k%10;
for(int _i=1;_i<=9;_i++)
{
sum+=l[_i];
xx*=l[_i];
}
if(sum==45&&xx==362880)
{
f=true;
cout<<i<<" "<<j<<" "<<k<<"\n";
}
}
}
if(f==false) cout<<f<<"!!!";
}
by Cola @ 2018-10-17 20:26:55
@SVIP2007126 你AC1008了吗
by WA鸭鸭 @ 2018-10-17 20:27:11
@SVIP2007126 输出NO!!!
by SVIP2007126 @ 2018-10-18 09:16:00
using namespace std; int main() { bool f=false; int a,b,c,i,j,k; cin>>a>>b>>c; for(i=(123/a+min(123%a,1))a;i<=987/aa;i=i+a) { j=i/ab; k=i/ac; if(j>=100&&j<=999&&k>=100&&k<=999) { int l[10],sum=0,xx=1; l[1]=i/100; l[2]=i/10%10; l[3]=i%10; l[4]=j/100; l[5]=j/10%10; l[6]=j%10; l[7]=k/100; l[8]=k/10%10; l[9]=k%10; for(int _i=1;_i<=9;_i++) { sum+=l[_i]; xx*=l[_i]; } if(sum==45&&xx==362880) { f=true; cout<<i<<" "<<j<<" "<<k<<"\n"; } } } if(f==false) cout<<"NO"<<"!!!"; } 还是只有60分