1111 问题 D: Cylinder

时间限制: 1s 内存限制: 128MB 提交: 3707 解决: 1595
题目描述

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


Cut the paper horizontally (parallel to the shorter side) to get two rectangular parts.

From the first part, cut out a circle of maximum radius. The circle will form the bottom of the cylinder.

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.

样例输入
10 10
10 50
10 30
0 0

样例输出
54.247
785.398
412.095
提示
零基础同学可以先学习视频课程,包含C/C++、Python、百练、蓝桥杯辅导、算法数据结构等课程,提供视频讲解以及配套习题,还有老师答疑,点击这里了解课程详情

比赛公告

由于洛谷中创建公开赛较难,又要自己出题,出数据+验题,而在C语言网中可以自由举办非恶意的比赛,所以123觉定举办一场公开的提高题大赛。一共4题。为了防止被喷毒瘤,所以时间较长。这样也可以减少题目问题,不必实时在线。