赞
踩
#include<stdio.h>
int f(int, int);
int main(void)
{
int n, m;
while(scanf("%d%d", &m, &n) != EOF)
{
int t = 0;
while(m <= n)
{
if(f(m, t))
++t;
++m;
}
if(t == 0)
printf("no");
putchar('\n');
}
return 0;
}
int f(int i, int t)
{
int x, y, z, n;
x = i/100;
y = i%10;
z = i/10;
n = z%10;
if(i == x*x*x + y*y*y + n*n*n){
if(t == 0)
printf("%d", i);
else
printf(" %d", i);
return 1;
}
else
return 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。