#include <cstdio>#include <cstring>int visit[10]={0};booljudge(int a,int b){if(b >98765)return0;//b大于最大值五个数组成的(5,6,7,8,9) memset(visit,0,sizeof(visit));//判断是否有重复元素的方法if(a <10000)
visit[0]=1;//列出a,b不同位置上的数 while(a !=0){
visit[a %10]=1;
a /=10;}while(b !=0){
visit[b %10]=1;
b /=10;}//看是否a,b中都包含0,1,2,3,4,5,6,7,8,9 for(int i =0; i <10; i++){if(visit[i]==0)returnfalse;}returntrue;}intmain(){int n;bool flag =true;scanf("%d",&n);for(int i =1234; i <100000; i++){if(judge(i, i*n)){printf("%05d/%05d=%d\n", i*n, i, n);
flag =false;}}if(flag)printf("There are no solutions\n");return0;}