Pythagorean triplets

I’m getting no-output for two testcases, probably for -1. Please tell me as to how I can modify my code.

@harshvapilani
Sorry for the late reply,why are you checking till 100000 only the Triplets may go beyond that,except for the “-1”,your code is failing in those test cases too,where the Ouput is in beyond 10^5.
Please modify your code as per my Hint:
The brute force method of checking is not going to work here,there is some algebra associated with the triplets try to discover that.
If still the problem persists don’t hesitate to ask here,we will surely help you.

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.