#include<stdio.h>
int main(){
int m,n,i,a,b,c,s;
scanf("%d%d",&m,&n);
for(i=m;i<=n;i++){
a=i/100;b=i/10-a*10;c=i%10;
s=a*a*a+b*b*b+c*c*c;
if(s==i)printf("%d\n",i);
}
return 0;
}
原文地址:https://www.cnblogs.com/huoyuying/p/9735684.html
时间: 2024-11-05 14:39:49