시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB25420016781.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.

  • Cone: V = (1/3)πr2h
  • Cylinder: V = πr2h
  • Sphere: V = (4/3)πr3

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

예제 입력 1

5
S 3.0
C 2.5 3
S 1.79
L 2.78 1.4
C 1.15 2.36

예제 출력 1

113.097