Run ID:160222

提交时间:2026-09-13 14:17:11

#include <iostream> #include <cmath> using namespace std; int main() { int h, r; cin >> h >> r; // 计算桶的体积(立方厘米) double volume = 3.14159 * r * r * h; // 转换为升 double volume_liters = volume / 1000.0; // 计算需要的桶数,向上取整 int buckets = ceil(20.0 / volume_liters); cout << buckets << endl; return 0; }