1 条题解

  • 0
    @ 2025-3-10 16:44:24
    #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;
    }
    
    • 1

    信息

    ID
    44
    时间
    1000ms
    内存
    256MiB
    难度
    7
    标签
    递交数
    14
    已通过
    10
    上传者