same solutions of 'Helping Lira' giving different responses from the judge

These two solutions are exactly same except the method of taking the input, but the first one is giving wrong answer while the second is giving AC.

Well, first of all your both solutions aren’t same…!

Rest, why you got WA ?

You have get_ini() function in your WA solution, thats what is creating problem. The question indicate input as :

-1000 ≤ xi, yi ≤ 1000
i.e. NEGITIVE numbers too.
While your get_int() function don’t have anything to take (-)ive numbers as input, thats where you got lost and reached wrong destination called WA.

Hope it solve your problem. :slight_smile:
Happy programming…

if you need more help, or wish to see correct get_int function check this link :

oh, thanks. then i have add an extra if condition for sign in the get_int. :slight_smile: