Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- n, r = map(int, input().split())
- if r * 2 <= n:
- print(math.pi * r * r)
- exit(0)
- if 2 * r >= n * math.sqrt(2):
- print(n * n)
- exit(0)
- print(math.pi * r * r - 4 * math.acos(n / r / 2)
- * r * r + 2 * n * math.sqrt(r * r - n * n / 4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement