Pythogoras Triplet

Given a number N (denoting one of the legs of the triangle), Print its Pythagoras pair in increasing order if they exist. Otherwise, print “-1”.

hello @Subrat
please refer this-> https://www.hackerrank.com/challenges/pythagorean-triple/editorial

@Subrat Is your doubt resolved?
You can also refer this:

1 Like