Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pi = 3.1415926535897932384626433832795
- from math import *
- side, R = [int(x) for x in str(input()).split(' ')]
- if (R <= side/2):
- print(Pi*R*R)
- elif (2**0.5*side/2<=R):
- print(side*side)
- else:
- d = side/2
- S = R*R*acos(d/R) - d*sqrt(R*R-d*d)
- print(Pi*R*R-4*S)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement