Pythagoras triplet

hey!
I came across this logic on the internet but still not able to claer all the test cases. Can you tell what are they?

your answer in case of even was bit wrong,
Corrected Code