for嵌套循环
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h >
#include<math.h>
int main()
{
int i = 0;
for (i = 100; i < 1000000; i++)
{
int a, b, c, d, e, f;
a = i % 10;
b = i % 100/10;
c = i % 1000/100;
d = i % 10000/1000;
e = i % 100000/10000;
f = i / 100000;
for (int n = 1; n <= 6; n++)
{
if (i == pow(a, n) + pow(b, n) + pow(c, n) + pow(d, n) + pow(e, n) + pow(f, n))
{
printf("%d\n", i);
}
}
}
return 0;
}