Podczas kompilacji pokazuje błędną odpowiedź, chociaż wynik jest prawidłowy. Jakieś porady?
def sides(x,y):
k,n = 0,2
if(y<0):
k=1
if(x>0):
n=3
if(x>0) and (y>0):
print(k, y)
print(n,x)
elif(x<=0) and (y>0):
print(k, y)
elif(y<=0) and (x>0):
print(n, x)
elif(y<=0) and (x<=0):
print("studnia")
a=int(input())
x,y=0,0
for i in range(a):
t=int(input())
for b in range(t):
k, l = [int(x) for x in input().split()]
if k == 0:
y=y+l
elif k == 1:
y=y-l
elif k == 2:
x=x-l
elif k==3:
x=x+l
sides(x,y)
x,y=0,0