|Online Judge||Problem Set||Authors||Online Contests||User|
Using a sheet of paper and scissors, you can cut out two faces to form a cylinder in the following way:
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.
10 10 10 50 10 30 0 0
54.247 785.398 412.095
In the first case, the optimal cylinder has a radius of about 1.591549, in the second case, the optimal cylinder has a radius of 5, and in the third case, the optimal cylinder has a radius of about 3.621795.
[Submit] [Go Back] [Status] [Discuss]
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator