#include<stdio.h>
int main(){
int age=1;
int san=0;
int si=0;
int sum=0;
while(age>0)
{
san=age*age*age;
si=age*age*age*age;
int t1,t2,t3,t4;
int f1,f2,f3,f4,f5,f6;
t1=san/1000;
t2=(san-t1*1000)/100;
t3=(san-t1*1000-t2*100)/10;
t4=san-t1*1000-t2*100-t3*10;
f1=si/100000;
f2=(si-f1*100000)/10000;
f3=(si-f1*100000-f2*10000)/1000;
f4=(si-f1*100000-f2*10000-f3*1000)/100;
f5=(si-f1*100000-f2*10000-f3*1000-f4*100)/10;
f6=si-f1*100000-f2*10000-f3*1000-f4*100-f5*10;
sum=t1+t2+t3+t4+f1+f2+f3+f4+f5+f6;
if(sum==45){
printf("%d",age);
break;
}else{
age++;
}
}
}
//劣质代码,不值一看,如有好建议,请回复。