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

6512번 - Cylinder 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB14101071.429%

문제

Using a sheet of paper and scissors, you can cut out two faces to form a cylinder in the following way:

  1. Cut the paper horizontally (parallel to the shorter side) to get two rectangular parts.
  2. From the first part, cut out a circle of maximum radius. The circle will form the bottom of the cylinder.
  3. Roll the second part up in such a way that it has a perimeter of equal length with the circle's circumference, and attach one end of the roll to the circle. Note that the roll may have some overlapping parts in order to get the required length of the perimeter.

Given the dimensions of the sheet of paper, can you calculate the biggest possible volume of a cylinder which can be constructed using the procedure described above?

입력

The input consists of several test cases. Each test case consists of two numbers w and h (1 ≤ w ≤ h ≤ 100), which indicate the width and height of the sheet of paper.

The last test case is followed by a line containing two zeros.

출력

For each test case, print one line with the biggest possible volume of the cylinder. Round this number to 3 places after the decimal point.

제한

예제 입력 1

10 10
10 50
10 30
0 0

예제 출력 1

54.247
785.398
412.095

힌트

출처

Contest > University of Ulm Local Contest > University of Ulm Local Contest 2007 C번

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

출처

대학교 대회

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

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