3 条题解

  • 2
    @ 2026-1-23 12:11:03

    #include <bits/stdc++.h>

    using namespace std;

    int main() {

    int a;

    cin >> a;

    if (a <= 10) {

    cout << fixed << setprecision(2) << a * 0.8+
    0.2;
    } 
    

    else if (a > 10 && a <= 20) {

    cout << fixed << setprecision(2) << (a-10) 
    * 0.75 +10*0.8+0.2;
    } 
    

    else if (a > 20 && a <= 30) {

    cout << fixed << setprecision(2) << (a-20)*
    0.7+10*0.75+10*0.8+0.2;
    } 
    

    else {

    cout << "Fail";
    }
    
    return 0;
    

    }

    信息

    ID
    144
    时间
    1000ms
    内存
    64MiB
    难度
    7
    标签
    递交数
    305
    已通过
    63
    上传者