Advertisement
Bad_Programist

Untitled

Oct 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 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. x5 = max(x1, x3)
  11. y5 = max(y1, y3)
  12. x6 = min(x2, x4)
  13. y6 = min(y2, y4)
  14.  
  15. if x5 >= x6 or y5 >= y6: S = 0
  16. else: S = (x6 - x5) * (y6 - y5)
  17. print(S)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement