시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 254 | 200 | 167 | 81.863% |
Write a program to find the maximum volume of given geometric 3-dimensional figures. Here, there are 3 types of figures: cone, cylinder and sphere.
The volume (V) of each figure can be calculated by the following formulas.
Use the value π = 3.14159 in your calculation.
The first line of the input contains a positive integer n (1 ≤ n ≤ 100) which is the number of figures. The n following lines contain the description of each figure. In case of a cone, the line begins with letter C and followed by 2 values: r and h respectively. If it is a cylinder, the line begins with letter L and followed by 2 values: r and h respectively. If it is a sphere, the line begins with letter S and followed by only one value which is r.
Print out the max volume among the input figures with 3 decimal places
5 S 3.0 C 2.5 3 S 1.79 L 2.78 1.4 C 1.15 2.36
113.097