Cant understand the problem

how can I know which test cases are not working?

i will give you an approach so that you can correctly code

Pythagorean triplet are of form m^2-n^2, 2mn , m^2+n^2…in this ques you are given a value…assume that this value can be of first form or second form(as it is given in the ques that the value is one of the leg of the triangle)…so if the given value say ‘a’ is even then you can equate it to 2mn…mn=a/2…there can be various values of (m,n)…you can take any value of (m,n)… one possible value can be m=a/2 and n=1…else if the given value ‘a’ is odd equate it to m^2-n^2…by factorization m^2-n^2=(m+n)(m-n)…(m+n)(m-n)=a…there could be many values of (m,n)…you can chose any one…(m+n)=a and (m-n)=1 solving these two equations we get m=(a+1)/2 and n=(a-1)/2…as you know the values of m,n rest of the two pythagorean triplets can be found…

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.