#include <stdio.h>
#include <math.h>
int main()
{
int m,n,m1;
int sign;
while(scanf("%d %d",&m,&n)!=EOF){
sign=0;
m1=m;
if((m==0)&&(n==0)){
break;
}
for(;m1<=n;m1++){
if( m1== pow((m1/100),3) + pow((m1%100/10),3) + pow((m1%10),3) )
{
printf("%d ",m1);
sign=1;
}
}
if(sign==0){
printf("no");
}
printf("\n");
}
return 0;
}
swust oj31: 水仙花数
最新推荐文章于 2024-07-09 13:26:17 发布