#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int m,n;
while(scanf("%d%d",&m,&n)!=EOF){
int first=1,count=0;
int i,a,b,c;
if(m<100||n>999) break;
for(i=m;i<=n;i++){
a=i/100;
b=i/10%10;
c=i%10;
if(i==pow(a,3)+pow(b,3)+pow(c,3)){
count++;
if(first){printf("%d",i);first=0;}
else printf(" %d",i);
}
}
if(count==0) printf("no");
printf("\n");
}
return 0;
}
2010水仙花数
最新推荐文章于 2024-01-03 18:50:42 发布