Advertisement
Bad_Programist

Untitled

Oct 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. x1 = int(input())
  2. y1 = int(input())
  3. x2 = int(input())
  4. y2 = int(input())
  5. x3 = int(input())
  6. y3 = int(input())
  7. x4 = int(input())
  8. y4 = int(input())
  9.  
  10. if x4 > x1 and y4 > y1 and x3 <= x1 and y3 <= y1: S = (x4 - x1) * (y4 - y1)
  11. elif x1 > x4 and y1 > y4 and x1 <= x3 and y1 <= y3: S = (x1 - x4) * (y1 - y4)
  12. elif x2 > x3 and y2 > y3 and x1 <= x2 and y1 <= y2: S = (x2 - x3) * (y2 - y3)
  13. else: S = 0
  14. print(S)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement