It is showing that there is a fault in my first case. But it’s working fine when I’m using it on my pc. What’s the eroor?
Pythagoras triplet code
You are not considering the case where you have to print “-1”
In the question it is mentioned Print its Pythagoras pair in increasing order if they exist. Otherwise, print “-1”.
solution is not possible always in those cases u should print -1.
for example if n=1 then answer should be -1.
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.