DMOPC '14 Contest 5 P1 - Core Drill

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Simon got a new drill recently. Everyone knows that a drill is shaped like a right circular cone. Simon knows his drill has radius r and height h. But now he wants to calculate the volume. Write a program to help Simon!

Input Specification

The first line of input will have an integer r (1 \le r \le 100).

The second line of input will have an integer h (1 \le h \le 100).

Output Specification

The first line of output should have the volume of Simon's drill. The output will be accepted if it's within an absolute or relative error of 10^{-2}.

Sample Input

3
5

Sample Output

47.12

Hint

V is the volume of the right circular cone with radius r and height h.

V=\dfrac{\pi r^2h}{3}


Comments


  • 0
    gpizzle  commented on Dec. 9, 2025, 4:45 p.m. edited

    This evaluates to wrong if you use text to prompt the User. The input() function has to be blank. (on python 3)


    • 0
      do_ur_homwork  commented on Dec. 9, 2025, 11:59 p.m. edited

      The identical checker is being used. Follow the standard convention of having all lines terminate in a \n character, with no trailing whitespace and no prompts otherwise the checker won't know(and won't try to know) which part of your output is your prompt and which part isn't. Just make sure to follow the sample output.


  • 1
    powerroy  commented on Sept. 9, 2025, 8:06 a.m.

    I have not even learned about volume of cone!!!!!!!!


  • -19
    chernogore  commented on April 22, 2025, 7:02 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.