rldddd @ 2017-08-17 11:27:29
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,x1,x2,x3,d,e,f,g,h,i,j,k,l,y;
cin>>a>>b>>c;
for(x1=123;x1<=1000*a/c;x1++)
{
x2=x1*b/a;
x3=x1*c/a;
d=x2/100;e=x2/10%10;f=x2%10;
g=x3/100;h=x3/10%10;i=x3%10;
j=x1/100;k=x1/10%10;l=x1%10;
if(d!=e&&d!=f&&d!=g&&d!=h&&d!=i&&d!=j&&d!=k&&d!=l&&e!=f&&e!=g&&e!=h&&e!=i&&e!=j&&e!=k&&e!=l&&f!=g&&f!=h&&f!=i&&f!=j&&f!=k&&f!=l&&g!=h&&g!=i&&g!=j&&g!=k&&g!=l&&h!=i&&h!=j&&h!=k&&h!=l&&i!=j&&i!=k&&i!=l&&j!=k&&j!=l&&k!=l&&d!=0&&e!=0&&f!=0&&g!=0&&h!=0&&i!=0&&j!=0&&k!=0&&l!=0)
{cout<<x1<<" "<<x2<<" "<<x3<<endl;return 0;
}
}
cout<<"No!!!";
}
by c20191623 @ 2017-08-18 16:52:45
一开始我也是这么想的,但觉得麻烦