#include<iostream>
#include<cmath>
using namespace std;
#define S (pow(i/100, 3) + pow(i%100/10, 3) + pow(i%10, 3))
int main()
{
int m, n;
bool no, first;
while(cin >> m >> n)
{
no = first = true;
for(int i = m; i <= n; i++)
{
if(S == i)
{
if(first)
{
cout << i;
first = false;
}
else
cout <<' '<< i;
no = false;
}
}
if(no)
cout << "no";
cout << endl;
}
return 0;
}
HDU 2010
最新推荐文章于 2017-07-18 21:22:16 发布