p=3.14159m=0for _ in range(int(input())): a=input();b=[*map(float,a[2:].split())] if a[0]=='C':m=max(m,b[0]**2*b[1]*p/3) elif a[0]=='L':m=max(m,b[0]**2*b[1]*p) else:m=max(m,b[0]**3*p*4/3)print(m)
5 S 3.0 C 2.5 3 S 1.79 L 2.78 1.4 C 1.15 2.36
113.09724
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!