#include<iostream>
#include <math.h>
using namespace std;
int main()
{
int m = 0, n = 0;
int index = 0;
int bai= 0, shi = 0,ge = 0;
int count = 0;
while((cin >> m >> n) )
{
count = 0;
for(index = m; index <= n; index++)
{
bai = index/100;
shi = index%100/10;
ge = index%10;
if(index == (pow(bai,3)+pow(shi,3)+pow(ge,3)))
{
count++;
if(count == 1)
{
cout << index;
}
else
{
cout << " " << index;
}
}
}
if(count == 0)
{
cout << "no";
}
cout << endl;
}
}
360在线笔试题:水仙花数
最新推荐文章于 2020-09-15 19:38:55 发布