Code: Select all
#include<iostream>
//#include<stdlib.h>
using namespace std;
main()
{
long x,y;
int i,j,l;
int count=0;
int balls=0;
while(cin>>x>>y)
{ balls=0;
for(i=x;i<x+y;i++)
{
count=0;
for(j=1;j<=sqrt((float)i);j++)
for(l=1;j*j*j+l*l*l<=i;l++)
{
if(j*j*j+l*l*l==i)
{
count++;
if(count==3)
{cout<<i<<endl;balls++;}
}
}
}
if(balls==0)
cout<<"None\n";
}
// system("pause");
}