M,n value substitution?

m * n = N / 2 How can we take m = N / 2 and n = 1

Hi @sahazeer123, In this question we will be given N that is either the base or height of a triangle and we need to find triplet satisfying the pythagoras theorum
So, u know that if we have two numbers m and n then we can definetly find a triplet that will satisfy the pythagoras theroum and the triplet will be
(m^2-n^2 , 2*m*n , m^2+n^2)
Here we are sure that m^2+n^2 is hypotenues
so the given number N can be either (m^2-n^2) or 2mn
Since you need to find only one triplet , so what u can do if n is even we can write it as 2 * X
if find m and n satisfying m*n=X then we can find the triplet so, if we take m=1 or n=1 then other will be X thus we know m and n thus we get the triplet . I hope u got what i am saying .

As we need to find one such value of m and n that can satisfy m*n=(N/2) we can take N/2 as m and 1 as n
In case of any doubt feel free to ask :slight_smile:
If you got the answer make sure to mark it resolved

1 Like

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.