Cylinder volume
A cylinder has a height
h
and a radius r
. Your task is to calculate the volume of that cylinder.As a reminder, the volume of the cylinder is calculated by multiplying the area of the base circle by the height:
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F970c0b2f-4c22-46ac-8179-3a33efb645de%2Faws4_requestX-Amz-Date20220410T152219ZX-Amz-Expires86400X-Amz-Signaturedebf0437090d3c921870766fe82a05af1fff85b77d38ec35ccfcb7ab59533554X-Amz-SignedHeadershostx-idGetObject.png?table=block&id=e417f68d-9eab-4a13-b5a2-6b35ea6e9c05&cache=v2)
The first 2 lines of the input represent the
h
and the r
of the cylinder. Print its volume in the output.
Input | Output |
15
6 | 1696.46 |
You might want to set the value of to something very precise like
3.14159265359
.Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB