#include<stdio.h>
int main(){
int i,j;
while(~scanf("%d%d",&i,&j)){
int a;
int count = 0;
for(a = i;a <= j; a++){
int o,p,q;
o = a % 10;
p = a / 100;
q = (a - p*100) / 10;
if(a == o*o*o + p*p*p + q*q*q){
if(count == 1)printf(" ");//第一个输出数 之后为”空格+数“输出
printf("%d",a);
count = 1;
}
if(a == j && count == 0)printf("no");
if(a == j)printf("\n");
}
}
return 0;
}
杭电oj 2010
最新推荐文章于 2024-03-13 23:46:33 发布