题解分享
题解分享简介
大象喝水查 - 题解
```
#include <bits/stdc++.h>
using namespace std;
int main()
{
int h,r;
cin >> h >> r;
double v = 3.14159 * (r * r * h) / 1000; //这里是ml / 1000 ==》 l
double count = 0;
int t = 0;
if ( v >= 20 ) {
cout << 1;
return 0;
}
while ( count < 20 ) {
count = count + v;
t++;
}
cout << t;
return 0;
}
```
查看全文
0
0
0
2



