1 条题解

  • 0
    @ 2026-10-21 18:57:04

    #include <bits/stdc++.h> #include using namespace std;

    int main() { double weight; cin >> weight; double cost; // 判断行李重量是否小于等于 20 公斤 if (weight <= 20) { cost = weight * 1.68; } else { cost = weight * 1.98; } // 输出费用,保留两位小数 cout << fixed << setprecision(2) << cost << endl; return 0; }

    • 1

    信息

    ID
    469
    时间
    1000ms
    内存
    64MiB
    难度
    3
    标签
    递交数
    198
    已通过
    102
    上传者