TOPIC

Wrong answer (10%)

Douglas Constant asked 2 years ago

def dama(): pos = str(input()) separapos = pos.split() x1 = int(separapos[0]) y1 = int(separapos[1]) x2 = int(separapos[2]) y2 = int(separapos[3]) if x1>=1 and y1>=1 and x2>=1 and y2>=1 and x1<=8 and y1<=8 and x2<=8 and y2<=8: if x1 == x2 and y1 == y2: return 0 elif x1 == x2 and y1 != y2: return 1 elif x1 != x2 and y1 == y2: return 1 elif x1 != x2 and y1!=y2: som1 = x1 + y1 som2 = x2 + y2 sub1 = x1 - y1 if sub1 < 0: sub1 = sub1 (-1) sub2 = x2 - y2 if sub2 < 0: sub2 = sub2 (-1) if som1 == som2: return 1 elif sub1 == sub2 and x2>x1 and y2>y1: return 1 elif sub1 == sub2 and x1>x2 and y1>y2: return 1 elif sub1 == sub2 and x2>x1 and y1>y2: return 1 elif sub1 == sub2 and x1>x2 and y2>y1: return 1 else: return 2 elif x1==0 and y1==0 and x2==0 and y2==0: return r = 1 while r!=None: r = dama() if r!=None: print(r)

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.