시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 1024 MB | 15 | 14 | 14 | 93.333% |
As a budding computer scientist, you’ve realized that it’s very important to have your morning coffee. Furthermore, it’s good to know when the coffee will run out so you can properly plan when to refill.
Your coffee mug is the shape of a cross section of a cone. Here is a horizontal view:
You start the morning with a full cup. After some amount of time, you note the depth of the coffee remaining – this is the distance from the bottom of the cup to the surface of the coffee (note that the surface of the coffee is a plane parallel to the bottom of the cup). Given this information, calculate how much more time it will take before the coffee is finished, assuming that you drink coffee at the same constant rate the whole time.
Given the information about the cup and elapsed drinking time, determine how many minutes it will take to finish the coffee.
There is only one input line; it contains five space separated integers:
Print a single floating point number on a line by itself: the number of minutes it will take to finish the cup of coffee. Any answer within an absolute or relative tolerance of 10-6 will be accepted.
3 7 5 15 4
30.284316723
10 50 100 47 50
12.469387755
5 6 12 30 7
35.081603090