14 条题解

  • 6

    #include <iomanip>

    #include <iostream>

    using namespace std;

    int main()
    {

    double h, r, v;

    int n;

    cin>>h>>r;

    v=r*r*3.1415926*h;

    n=int(20000/v);

    if (20000/v>0)
    {

    n++;

    cout<< n;

    }else {

    cout<< n;

    }

    return 0;

    }

  • 3

    #include<iostream>
    #include<cmath>
    using namespace std;
    const double PI=3.14159;
    int main(){
    int h,r;
    cin >> h >> r;
    cout<<ceil(20/(PI*r*r*h/1000));
    return 0;
    }

  • 2

    #include <iomanip>
    #include <iostream>
    using namespace std;
    int main()
    {
    double h, r, v;
    int n;
    cin>>h>>r;
    v=r*r*3.1415926*h;
    n=int(20000/v);
    if (20000/v>0)
    {
    n++;
    cout<< n;
    }else
    {
    cout<< n;
    }
    return 0;
    }

  • 1

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,v=0;
    double n,pai,d;
    d=20000;
    pai=3.14159;
    cin>>a>>b;
    n=a*b*b*pai;
    while(d>=0)
    {
    d=d-n;
    v++;

    }
    cout<<v;
    }

  • 1

    #include<bits/stdc++.h>
    #define db double
    using namespace std;
    int main()
    {
    const double Pi=3.14159;
    int a,h,r;
    cin>>h>>r;
    int cnt=0;
    int sum=0;
    while(sum<=20000)
    {
    sum+=Pi*r*r*h;
    cnt++;
    }
    printf("%d",cnt);
    return 0;
    }

  • 0
    @ 2024-08-18 17:21:29
    #include<iostream>
    using namespace std;
    int main() {
        int h, r;
        cin >> h >> r;
        cout << int(20000 / (h*r*r*3.14159)) + 1;
        return 0;
    }
    
  • 0

    #include <iostream>
    #include <cmath>
    using namespace std;
    int main()
    {
    int h,r;
    cin>>h>>r;
    cout<<ceil(20*1000/(3.14159*r*r*h))<<endl;
    return 0;
    }

  • 0

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int h,r,sum;
    double pi=3.14159,v,ml;
    cin>>h>>r;
    v=pi*r*r*h;
    ml=v;
    sum=ceil(20000/ml);
    cout<<sum;
    return 0;
    }

  • -2

    #include <iomanip>
    #include <iostream>
    using namespace std;
    int main()
    {
    double h, r, v;
    int n;
    cin>>h>>r;
    v=r*r*3.1415926*h;
    n=int(20000/v);
    if (20000/v>0)
    {
    n++;
    cout<< n;
    }else
    {
    cout<< n;
    }
    return 0;
    }

  • -3
  • -3
    #include <iomanip>
    #include <iostream>
    using namespace std;
    int main() {
        double h, r, v;
        int n;
        cin>>h>>r;
        v=r*r*3.1415926*h;
        n=int(20000/v);
        if (20000/v>0){
            n++;
            cout<< n;
        }
        else {
            cout<< n;
        }
        return 0;
    }
    
  • -3

    #include<bits/stdc++.h>
    #define db double
    using namespace std;
    const db pi=3.14159;
    int main(){
    db h,r;cin>>h>>r;
    int cnt=0;
    db sum=0;
    while(sum<=20000){
    sum+=pi*r*r*h;
    cnt++;
    }
    printf("%d",cnt);
    return 0;
    }

  • -3
    @ 2021-11-21 21:12:02

    #include <iostream>
    #include <cmath>
    using namespace std;
    int main()
    {
    int h,r;
    cin>>h>>r;
    cout<<ceil(20*1000/(3.14159*r*r*h))<<endl;
    return 0;
    }

  • -10
    @ 2021-04-28 22:00:24
    #include<bits/stdc++.h>
    #define db double
    using namespace std;
    const db pi=3.14159;
    int main(){
        db h,r;cin>>h>>r;
        int cnt=0;
        db sum=0;
        while(sum<=20000){
            sum+=pi*r*r*h;
            cnt++;
        }
        printf("%d",cnt);
        return 0;
    } 
    
  • 1

信息

ID
1000
难度
7
分类
(无)
标签
递交数
1537
已通过
289
通过率
19%
被复制
29
上传者