Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input())
- M = int(input())
- x = int(input())
- y = int(input())
- if M > N:
- a = (N - x)
- b = (M - y)
- if a < y < x < b:
- print (a)
- elif y < a < b < x:
- print (y)
- elif b < y < a < x:
- print (b)
- else:
- print (x)
- else:
- a = (M - x)
- b = (N - y)
- if a < y < x < b:
- print (a)
- elif y < a < b < x:
- print (y)
- elif b < y < a < x:
- print (b)
- else:
- print (x)
Advertisement
RAW Paste Data
Copied
Advertisement