7 条题解

  • 0
    @ 2024-11-14 13:38:11

    `

    
    
    #include<bits/stdc++.h>
    using namespace std;
    
    int main()
    
    {
    double h,t,s;
    cin>>h>>t;
    s=h;
    
    

    for(int i=0;i<t-1;i++) { s=s+2*(h/2.0); h=h/2.0; } cout<<fixed<<setprecision(6)<<s;

    return 0;

    
    }
    
    
    
    

    信息

    ID
    57
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    175
    已通过
    59
    上传者