首页 > 其他分享 >ABCD*E=DCBA

ABCD*E=DCBA

时间:2022-09-23 21:22:36浏览次数:41  
标签:ABCD 10 DCBA d% && printf

#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int a,b,c,d,e;
for(a=0;a<=9;a++)
{
for(b=0;b<=9;b++)
{
for(c=0;c<=9;c++)
{
for(d=0;d<=9;d++)
{
for(e=0;e<=9;e++)
{
if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&d!=e)
{
if((a*1000+b*100+c*10+d)*e==(d*1000+c*100+b*10+a))
{
printf("%d%d%d%d\n",a,b,c,d);
printf("* %d\n",e);
printf("_____\n");
printf("%d%d%d%d\n",d,c,b,a);
}
}
}
}

}

}

}
system("pause");
return 0;
}

标签:ABCD,10,DCBA,d%,&&,printf
From: https://www.cnblogs.com/2948141372xyc/p/16724397.html

相关文章

  • Codeforces Round #821 (Div. 2) ABCD1
    A.ConsecutiveSumhttps://codeforces.com/contest/1733/problem/A题目大意:给定一个长度为n的数组a。最多可以执行k次以下操作:选择两个指数i和j,其中imodk=jmodk......
  • Codeforces Round #817 (Div. 4) ABCDEFG
    https://codeforces.com/contest/1722/problem/A#include<bits/stdc++.h>usingnamespacestd;typedeflonglongLL;typedefpair<int,int>PII;constintN=200200,......