Ling34Huang21mXuan @ 2023-08-18 20:52:28
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C;
int sum1;
for(int i = 100;i<=333;i++){
int a = i*A , b = B*i , c = C*i , vis[10] = {0} , sum = 0;
vis[a/100] = vis[a/10%10] = vis[a%10] = 1;
vis[b/100] = vis[b/10%10] = vis[b%10] = 1;
vis[c/100] = vis[c/10%10] = vis[c%10] = 1;
for(int j = 1;j<=9;j++) sum+=vis[j];
if(sum==9) cout<<a<<" "<<b<<" "<<c<<endl;
sum1 = sum;
}
if(sum1) cout<<"No!!!";
return 0;
}
by Hilte @ 2023-08-18 20:59:38
您连样例都不测一下的吗?