Problem L
Another Dimension
Time to take your brains to another dimension. Pay close attention!
The volume of a sphere can be calculated as $V = \frac{4}{3} \pi r^3$.
Now imagine we have a hemisphere, also known as a half-sphere, so a sphere where one half has been removed.
Given the diameter of the original sphere, output the volume of the half-sphere. Note that the diameter of a sphere is defined as double the radius of the same sphere.
Hint: you can use the pi variable in the math module.
Input
Input consists of one line with one floating point number $d$, the diameter of the sphere, where $0 \leq d \leq 1000$. It is guaranteed that the number is given with at most two digits after the decimal point.
Output
Output consists of one line with one floating point number, the volume of the half-sphere. The output number should have an absolute or relative error of at most $10^{-9}$.
Sample Input 1 | Sample Output 1 |
---|---|
4.8 |
28.952917895483527 |
Sample Input 2 | Sample Output 2 |
---|---|
6 |
56.548667764616269 |
Sample Input 3 | Sample Output 3 |
---|---|
20 |
2094.395102393195430 |
Sample Input 4 | Sample Output 4 |
---|---|
2 |
2.094395102393195 |