Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import math
  2.  
  3. x = float(input())
  4. y = float(input())
  5.  
  6. r = math.sqrt(math.pow(x, 2) + math.pow(y, 2))
  7. theta = math.atan2(y, x)
  8.  
  9. beta = (math.pi / 2) + (math.pi / 20) - theta
  10.  
  11. while beta < 0:
  12. beta += 2 * math.pi
  13.  
  14. for i in range(0, 21):
  15. if beta <= ((i * math.pi) / 10):
  16. section = i
  17. break
  18.  
  19. points = 0
  20. if r <= 6.35:
  21. points = 50
  22. elif r <= 15.9:
  23. points = 25
  24. elif r <= 97.4:
  25. points = section
  26. elif r <= 107:
  27. points = section * 3
  28. elif r <= 160.4:
  29. points = section
  30. elif r <= 170:
  31. points = section * 2
  32.  
  33. print(points)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement