Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160222 陈沐星 11大象喝水 C++ Accepted 1 MS 272 KB 433 2026-09-13 14:17:11

Tests(10/10):


Code:

#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; }