wddwjlss @ 2017-09-26 20:11:48
#include<bits/stdc++.h>
using namespace std;
int main()
{
int l,b,c,d,e,f,g,h,i,k,j,r,x,y,z,a[100],flag,m,n,q,flag1=0;
cin>>l>>b>>c;
for(i=1;i<=3;i++)
for(j=1;j<=9;j++)
for(k=1;k<=9;k++)
{
d=100*i+10*j+k;
e=d*b;
f=d*c;
g=e/100;
h=(e/10)%10;
r=e%10;
x=f/100;
y=(f/10)%10;
z=f%10;
a[0]=i;
a[1]=j;
a[2]=k;
a[3]=g;
a[4]=h;
a[5]=r;
a[6]=x;
a[7]=y;
a[8]=z;
flag=0;
for(m=0;m<=8;m++)
for(n=m+1;n<=8;n++)
if(a[m]==a[n])
flag=1;
if(flag!=1&&f<=999&&h!=0&&r!=0&&y!=0&&z!=0)
{
cout<<d<<" "<<e<<" "<<f<<endl;
flag1=1;
}
}
if((flag==1||f>=999||h==0||r==0||y==0||z==0)&&flag1==0)
cout<<"No!!!";
return 0;
}
by Sakk @ 2017-10-02 15:02:33
最后一个点比例是123:456:789,出现小数了
by xhx0809 @ 2017-11-27 20:12:00
不因该是“No!!!“吗?