Description
体育馆计划再新建一个正圆锥形储水池。
如图,将水注入深8m,上顶直径为8m的正圆锥形容器,其注水速率为4立方米/分钟,当水深为h时,其表面上升的速度v是多少(米/分钟)?
Input
第一行为一个整数N
接下来N行,每行输入一个实数h,0 < h < 8
Output
对每个输入的h,输出一个浮点数,保留两位小数,表示表面上升的速度v
Sample Input
1
5
Sample Output
0.20
Hint
从前有棵树,挂了很多人……
别挂在高树上喔~~
圆周率pi=3.1415926535897932384632
#include<iostream>
using namespace std;
#define p 3.14159265358979323846
int main()
{
int t;
cin>>t;
while(t--)
{
double h,y;
cin>>h;
y=16/(p*h*h);
cout.setf(ios::fixed);
cout.precision(2);
cout<<y<<endl;
}
}