|
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <windows.h>
- int main()
- {
- int a,b,c,d,e;
- for(a=0;a<10;a++)
- for(b=0;b<10;b++)
- for(c=0;c<10;c++)
- for(d=0;d<10;d++)
- for(e=0;e<10;e++)
- {
- if((a*10000+b*1000+c*100+d*10+e)*c==e*111111)
- if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e)
- {
- printf("%d%d%d%d%d\n",a,b,c,d,e);
- printf("*\n");
- printf("-----\n");
- printf("%d%d%d%d%d%d\n",e,e,e,e,e,e);
- }
- }
- system("pause");
- return 0;
- }
- 好的回复是对人的鼓励。
复制代码 |
|