用for来解答
2023-11-22 20:19:57
发布于:上海
#include<iostream>
using namespace std;
int main(){
for (int i=123; i<334; i++){
if (i%5 == 0) continue;
if (i<200&&i>195||i<300&&i>295) continue;
if (i<215&&i>200||i<315&&i>300) continue;
int a1=i1,a2=i2,a3=i*3;
if (a1/10%10 == 0||a2/10%10==0||a3/10%10 == 0) continue;
if (a1/100!=a1/10%10&&a1/10%10!=a1%10&&a1%10!=a1/100){
if (a2/100!=a2/10%10&&a2/10%10!=a2%10&&a2%10!=a2/100){
if (a3/100!=a3/10%10&&a3/10%10!=a3%10&&a3%10!=a3/100){
if (a1/100!=a2/10%10&&a2/10%10!=a3%10&&a3%10!=a1/100){
if (a2/100!=a3/10%10&&a3/10%10!=a1%10&&a1%10!=a2/100){
if (a3/100!=a1/10%10&&a1/10%10!=a2%10&&a2%10!=a3/100){
if (a1/100!=a3/10%10&&a3/10%10!=a2%10&&a2%10!=a1/100){
if (a2/100!=a1/10%10&&a1/10%10!=a3%10&&a3%10!=a2/100){
if (a3/100!=a2/10%10&&a2/10%10!=a1%10&&a1%10!=a3/100){
cout << a1 << " " << a2 << " " << a3 << endl;
}
}
}
}
}
}
}
}
}
}
return 0;
}
这里空空如也
有帮助,赞一个