Pythagorean's Challenge

i tried but i couldn’t find the answer pls help me with the code

Hey @tavinash391,
Your code is just failing some corner cases, so first look at the constraints A can take any value less than 1000 and just dry run your code for values less than 1000, you will see your code is failing at some points and then try to apply the logic for those values.

sir i did but i m not getting the exact ansr can you pls give me the code

Ok so try testing your code for input 0, then you will get the problem.

sir i did all the things i m not able to find the exact answer ?

Whats ur code returning on 0 input?

it return nothing just break the loop

Thats the issue, according to the question it should return something.

what it should return ???

it’s been 3 days while asking me this question but you haven’t answered it yet

what should it return if input is 0 ???

Hey @tavinash391,
For 0 the condition should be satisfied and {0,0} should be returned.

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.