[/color]
# include
Int main ()
{int N;
The scanf (" % d ", & amp; N);
If (N==3)
{
For (int m=100; m<1000; M++)
{int a, b, c;
A=m % 10;
B=m/100;
C=10% m/10;
If (m==a * a * b + a + b * b * c * c * c)
Printf (" % d \ n ", m);
}
}
The else
If (N==4)
{
For (int m=1000; m<10000; M++)
{
int a,b,c,d;
A=m % 10;
B=m/100% 10;
C=m/1000;
D=m/10% 10;
If (m==a * * a * a * b * b * b * b + c * c * c * d * * * c + d d d)
Printf (" % d \ n ", m);
}
If (N==5)
{
For (int m=10000; m<100000; M++)
{
Int a, b, c, d, e;
A=m % 10;
B=m/100% 10;
C=1000% m/10;
D=m/10% 10;
E=m/10000;
m++;
If (m==a * a * a * a * a * b * b * b * b * b + c * c * c * c * d * * * c + d d d + d * * * * * e e e e e)
Printf (" % d \ n ", m);
}
}
If (N==6)
{
For (int m=100000; m<1000000; M++)
{
Int a, b, c, d, e, f;
A=m % 10;
B=m/100% 10;
C=1000% m/10;
D=m/10% 10;
E=10000% m/10;
F=m/100000;
m++;
If (m==a * a * a * a * a * a * b * b * b * b * b * b + c * c * c * c * * c + d c * * d * * * d d d d + e * * * * * e e e e e + f * f * f * f * f * f)
Printf (" % d \ n ", m);
}
}
If (N==7)
{
For (int m=1000000; m<10000000; M++)
{
Int a, b, c, d, e, f, g;
A=m % 10;
B=m/100% 10;
C=1000% m/10;
D=m/10% 10;
E=10000% m/10;
F=10 m/100000%;
G=m/1000000;
m++;
If (m==a * a * a * a * a * a * a * b * b * b * b * b * b * b + c * c * c * c * c * c * d * * * c + d d d d d * * * * e d + e * * * * * e e e e e + f * f * f * f * f * f * f + g * g * * g * * * g g g g)
Printf (" % d \ n ", m);
}
}
}
}
CodePudding user response:
Suggest you use cycle, write so I don't think anyone is willing to learn programmingCodePudding user response:
You should delete 567 m++ inside itCodePudding user response: