#include <stdio.h>
#include <math.h>
int main(void)
{
int a,b;
int c,d,m;
for(a=100.0;a<=999;a++)
{
if(a%9 != 0)
continue;
b=(int)a/9;
c=a%10;
d=(int)a/10%10;
m=(int)a/100;
if(b==c*c+d*d+m*m)
printf("number %d find %d = %d * %d + %d *%d + %d * %d\n",a,b,c,c,d,d,m,m);
}
return 0;
}
答案只有一个
number 315 find 35 = 5 * 5 + 1 *1 + 3 * 3