#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int a,b,count,k1,k2,k3;
while(cin>>a>>b)
{
for(count=0;a<=b;a++)
{
k1=a/100;
k2=(a-k1*100)/10;
k3=a-k1*100-k2*10;
if(a==k1*k1*k1+k2*k2*k2+k3*k3*k3)
{
if(count!=0)
cout<<" ";
cout<<a;
count++;
}
}
if(count==0)
cout<<"no"<<endl;
else
cout<<endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
时间: 2024-11-04 22:39:23