请输出满足这样条件的五位数。
个位=万位
十位=千位
个位+十位+千位+万位=百位
*/
class ZuoYe3
{
public static void main(String[] args)
{
shu();
}
public static void shu(){
for (int a=10000;a<100000 ;a++ )
{
int ge=a%10;
int shi=(a/10)%10;
int bai=(a/100)%10;
int qian=(a/1000)%10;
int wan=a/10000;
if (ge==wan&&shi==qian&&(ge+shi+qian+wan)==bai)
{
System.out.println(a+":"+ge+"="+wan+" "+shi+"="+qian+" "+ge+"+"+shi+"+"+qian+"+"+wan+"="+bai);
}
}
}
}
|
|