Pythagoream triplet

I implemented as thought in hint. Still i didnt passed all the test cases.
How should i check if pythagrean triplet doesnot exits for any number ?

Hello @abhishek.personal.email,

The triplets you will are generating are Pythagoras triplets only if they satisfies the Pythagoras theorem:
hh=pp+b*b

Hope, this would help.
Give a like if you are satisfied.

1 Like

still not able to pass all the test cases ?

Then share your code with me.

1 Like

Hello @abhishek.personal.email,

You have missed the case when t<2.
your code is printing wrong output for that.
I have corrected it:

Hope, this would help.
Give a like if you are satisfied.

1 Like