#include
int main()
{
int m,n,i,k,t,sum;
printf("Input m: ");
scanf("%d",&m);
printf("Input n: ");
scanf("%d",&n);
for(i=m;i<=n;++i)
{
t=i;
sum=0;
while(t)
{
k=t%10;
sum+=k*k*k;
t/=10;
}
if(sum==i)
{
printf("%d\n",i);
}
}
return 0;
}