3 条题解

  • 0
    @ 2024-10-13 21:15:42
    #include <iostream>
    using namespace std;
    
    int main() {
        int weight;
        cin >> weight;
        int cost;
        if (weight < 10) {
            cost = weight * 3;
        } else {
            cost = 10 * 2 + (weight - 10) * 1;
        }
        cout << cost << endl;
        return 0;
    }
    

    信息

    ID
    45
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    递交数
    83
    已通过
    49
    上传者