新手天翼
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;
int count[15];
int main() {
int x=0;
for(int i=sqrt(2000);i<=sqrt(9999);i++){
for(int j=sqrt(2);j<=sqrt(9);j++){
for(int k=sqrt(200);k<=sqrt(999);k++){
memset(count,0,sizeof(count));
bool f=1;
count[i%10]++;
count[i%100/10]++;
count[i/100%10]++;
count[i/1000]++;
count[j]++;
count[k/100]++;
count[k%10]++;
count[k%100/10]++;
for(int t=2;t<=9;t++){
if(count[t]==0) f=0;
}
if(f==1&&i%j==1&&i/j==k)cout<<i<<" "<<j<<" "<<k<<endl;
}
}
}
return 0;
}
@赵朗 你回答出来加豆