Pythagoras Triplet 2 testcases failed

/1st loop condition-Sum of 2 sides if triangle is always greater
greater then the 3rd side.
2nd loop condition-Sum of squares of 2 sides is greater than the sq of 3rd side.
/
#include
using namespace std;
int main()
{
int n,l,m;cin>>n;
l=n;
m=n;
while(n+l>m)
{
while(n
n+l
l>mm)
{
m++;
}
l++;
if(n
n+ll==mm)
{cout<<l<<" "<<m;
break;}
}
if(n+l<=m)
cout<<-1;

return 0;

}

Poorvi, I would suggest you to go through the hint video given in the same section, and apply that approach in your code…

But Ma’am what is the error in this code?

What is the error in this code?

Poorvi, your code is not working correctly with large input values, for eg,
99999979
Expected output : 4999997900000220 4999997900000221
Your output : -1

Thts why I would recommend you to go through hint video and then try to implement that logic in your code…

Since you arent replying anything, I am marking this doubt as resolved… You can reopen it if u still face any issues…