passing only three test cases (approach used same as the hint given).what to do?
in the brute force approach also passing the same three test cases
#include
using namespace std;
int main() {
int n;
cin>>n;
int j=1; int i=1;
for( i=1;i>0;i++)
{
if(n==1)
{ cout<<-1<<endl;break;}
for(j=1;j<=(i+n);j++)
{
if(ii+nn==j*j)
{cout<<i<<" "<<j<<endl; break;}
}
if(j>i+n)
continue;
break;}
return 0;
}
what are the mistakes in the codes?