YankoGrancharov

figura

Jun 1st, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. h = int(input())
  2. x = int(input())
  3. y = int(input())
  4. a = "inside"
  5. b = "border"
  6. c = "outside"
  7. if ((0 <= x <= (3*h) and y == 0) or (0 <= x <= h and y == h) or (h <= x <= (2*h) and y == (h*4)) or ((h*2)<= x <= (h*3)  and y == h) or
  8.     (0 <= y <= h and x == 0) or (h <= y <= (h*4) and x == h) or (h <= y <= (h*4) and x == (h*2)) or (0 <= y <= h and x == (h*3)) ):
  9.     print (b)
  10. elif (0< x <(3*h) and 0<  y < h) or (h < x < (h*2) and h < y <(h*4)):
  11.     print(a)
  12. else:
  13.     print(c)
Advertisement
Add Comment
Please, Sign In to add comment