17 lines
409 B
C++
17 lines
409 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//cin读入优化
|
|
std::ios::sync_with_stdio(false);
|
|
|
|
int h, r;
|
|
cin >> h >> r;
|
|
double v = (3.14 * r * r * h) / 1000; //一桶水的体积
|
|
cout << ceil(20 / v) << endl; //向上取整
|
|
|
|
//cout << floor(20 / v) << endl; //向下取整
|
|
//cout << round(20 / v) << endl; //四舍五入取整
|
|
return 0;
|
|
} |