提交时间:2025-10-17 15:25:02

运行 ID: 70332

#include <iostream> using namespace std; int main() { int weight; char urgent; cin >> weight >> urgent; int fee = 8; if (weight > 1000) { int extra = weight - 1000; int units = extra / 500 + (extra % 500 != 0 ? 1 : 0); fee += units * 4; } if (urgent == 'y') { fee += 5; } cout << fee << endl; return 0; }