Pythagoras triplet

Can you plese share the logic of the problem .
I am unable to solve it.
link of the code https://ide.codingblocks.com/s/652814
test case 1,3,4 is not passing.