Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. d=int(input())
  2. x=int(input())
  3. y=int(input())
  4. x1=0; y1=0; x2=d; y2=0; x3=0; y3=d;
  5. k=(x1-x)*(y2-y1)-(x2-x1)*(y1-y);
  6. m=(x2-x)*(y3-y2)-(x3-x2)*(y2-y);
  7. n=(x3-x)*(y1-y3)-(x1-x3)*(y3-y);
  8. if (k>=0 and m>=0 and n>=0):
  9.     print (1)
  10. else:
  11.     print(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement