![]() |
VOOZH | about |
Given the radius r. Find the area of a circle. The area of the circle should be correct up to 5 decimal places.
Examples:
Input: r = 5
Output: 78.53982
Explanation: As area = PI * r * r = 3.14159265358979323846 * 5 * 5 = 78.53982, as we only keep 5 digits after decimal.Input: r = 2
Output: 12.56637
Explanation: As area = PI * r * r = 3.14159265358979323846 * 2 * 2 = 12.56637, as we only keep 5 digits after decimal.
The area of a circle can be calculated using the formula: area = PI * r * r
78.53982
Time Complexity: O(1)
Auxiliary Space: O(1), since no extra space has been taken.