Logo
(追記) (追記ここまで)

25818번 - How Much Coffee is Left? 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB46444095.238%

문제

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:

  • r (1 ≤ r ≤ 100), the radius of the bottom of the cup in inches,
  • s (r < s ≤ 1000), the radius of the top of the cup in inches,
  • h (2 ≤ h ≤ 1000), the height of the cup in inches,
  • m (1 ≤ m ≤ 1000), the number of minutes that coffee has been drank,
  • d (1 ≤ d < h), the depth of the remaining coffee in inches.

출력

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.

제한

예제 입력 1

3 7 5 15 4

예제 출력 1

30.284316723

예제 입력 2

10 50 100 47 50

예제 출력 2

12.469387755

예제 입력 3

5 6 12 30 7

예제 출력 3

35.081603090

힌트

출처

University > University of Central Florida > 2021 Local Programming Contest (Qualifying Round) 7번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /