1 solutions

  • 0
    @ 2024-7-20 19:53:03

    只需要注意三点:

    1,精度

    2,单位换算,1L=1dm^3=1000cm^3,20L=20000cm^3

    3, 向上取整

    #include<bits/stdc++.h>
    using namespace std;
    const double p=3.14;
    double h,r;
    int main(){
    	cin>>h>>r;
    	double V=p*r*r*h;
    	cout<<ceil(20000/V);
    	return 0;
    }
    

    这种水题我居然首AC?

    • 1

    Information

    ID
    6873
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    6
    Accepted
    2
    Uploaded By