Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. N = int(input())
  2. M = int(input())
  3. x = int(input())
  4. y = int(input())
  5. if M > N:
  6.     a = (N - x)
  7.     b = (M - y)
  8.     if a < y < x < b:
  9.         print (a)
  10.     elif y < a < b < x:
  11.         print (y)
  12.     elif b < y < a < x:
  13.         print (b)
  14.     else:
  15.         print (x)
  16. else:
  17.     a = (M - x)
  18.     b = (N - y)
  19.     if a < y < x < b:
  20.         print (a)
  21.     elif y < a < b < x:
  22.         print (y)
  23.     elif b < y < a < x:
  24.         print (b)
  25.     else:
  26.         print (x)
Advertisement
RAW Paste Data Copied
Advertisement