# 【每日一题】问题 1111: Cylinder

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

0 条评论

• ### 手游后台PVP系统网络同步方案总结

来源：游迅网 发布者：wuyu 概述 　　PVP系统俨然成为现在新手游的上线标配，手游Pvp系统体验是否优秀，很大程度上决定了游戏的品质。从最近半年上线的新...

• ### 如何到达C语言的巅峰？我推荐你阅读《C语言小白变怪兽》！

《C语言小白变怪兽》融入了作者 8 年的编程功力，以及文学级的写作能力，耗时 5 年完成，期间经过了 5 次大改版。

• ### [蓝桥杯]Hello, world!

题目描述 This is the first problem for test. Since all we know the ASCII code, your ...

• ### CodeForces 24D Broken robot （概率DP）

D. Broken robot time limit per test 2 seconds memory limit per test 256 me...

• ### What is PCA ?

figure cited here, recommend reading: A step by step explanation of Principal Co...

• ### Knapsack problem algorithms for my real-life carry-on knapsack

I'm a nomad and live out of one carry-on bag. This means that the total weight o...

• ### 记录一次Stack上关于“数学之美”的brainstorm

math.stackexchange.com是stackExchange上一个和数学有关的论坛, 有点类似我们的贴吧, 当然质量肯定不可相提并论的.

• ### C. NEKO's Maze Game

time limit per test:1.5 seconds memory limit per test:256 megabytes inputstandar...