This code is showing error


I think it is showing error due to -1 case.
How can I use that?

@cbcao263
You’ve mentioned the wrong question. Please send the link to the correct problem.

Sorry Sir
The code is


For Pythagorean triplet One.
It is not passing a case.


See this i have commented where i changed some code.

Mam But Let we have given 3 so we will have to print 4 and 5 only, But if 4 is given then we will have to print 3 and 5. Why we are comparing 3 and 4.

Even now, It is giving same answer as in mine. In mine too it showed 4 test cases passed and rest not but in this too 1 Test Case is also not passed last one.


Mam This is the code by me and the case I left was of -1. And It has passed all the test cases.
Thanks for the help Mam.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.