#include<iostream>
using namespace std;
int main()
{
int m,n,count=0;
while(cin>>m>>n)
{
if(m>n)
{
int temp;
temp=n;
n=m;
m=temp;
}
if(m>=100 && m<=n && n<=999)
{
for(int i=m;i<=n;i++)
{
if(i==(i/100)*(i/100)*(i/100)+(i/10%10)*(i/10%10)*(i/10%10)+(i%10)*(i%10)*(i%10))
{
if(i!=n)
{
cout<<i<<" ";
count=1;
}
else
{
cout<<i<<endl;
count=1;
}
}
}
if(count==0)
{
cout<<"no"<<endl;
}
else
{
//cout<<endl;
count=0;
}
}
else
break;
}
return 0;
}
心态爆炸 一直弹出来输出格式不对。