2 条题解

  • 0
    @ 2025-3-16 12:13:11
    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        int w ;
        char j;
        int price = 8;
        cin >> w >> j;
        if(w > 1000) {
            w = w - 1000;
            // 超重部分
            price +=  w / 500 * 4;
            if(w % 500 !=0){
                price += 4;  //不足500克部分按500克计算
            }
        }
        // 加急
        if(j == 'y'){
            price += 5;
        }
        cout << price;
        return 0;
    }
    

    信息

    ID
    195
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    83
    已通过
    20
    上传者