Created
October 10, 2017 03:22
-
-
Save evjeny/3cf2ad367633a6aaf491a1a9854200cb to your computer and use it in GitHub Desktop.
Task1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def abs(k): | |
if k>=0: | |
return k | |
else: | |
return -k | |
def dist(ax,ay,bx,by): | |
if ax == bx: | |
return abs(ay-by) | |
elif ay==by: | |
return abs(ax-bx) | |
return ((ax-bx)**2+(ay-by)**2)**0.5 | |
ax,ay = [int(i) for i in input().split()] | |
bx,by = [int(i) for i in input().split()] | |
a = abs(ax-bx) | |
b = abs(ay-by) | |
mn = min(a,b) | |
mx = max(a,b) | |
sqs = mn | |
print(sqs+(mx-mn)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment