Tx1234567 @ 2023-02-08 08:37:35
#include <bits/stdc++.h> //run:0
using namespace std;
bool b[10], s = true;
long long A, B, C, X, Y, Z;
void go(int x){
b[x/100] = b[x/10%10] = b[x%10] = 0;
}
bool check(){
memset(b,-1,sizeof(b));
go(X), go(Y), go(Z);
for (int i = 1;i<=9;i++){
if (b[i]) return 0;
}
return 1;
}
int main(){
cin>>A>>B>>C;
for (X = 123;X<=987;X++){
if (X*B%A||X*C%A) continue;
Y = X*B/A, Z = X*C/A;
if (Y>999||Z>999) break;
if (check()){
printf("%d %d %d\n",X,Y,Z);
s = false;
}
}
if (s) cout<<"No!!!";
return 0;
}
by Ja50nY0un9_as_AgNO3 @ 2023-02-08 08:55:18
@Tx1234567 请务必注意 A=0 的情况/kk
by Tx1234567 @ 2023-02-24 19:29:41
好的
by Tx1234567 @ 2024-06-28 15:57:36
@Ja50nY0un9_as_AgNO3 进这个!!!https://www.luogu.com.cn/contest/175848