| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70332 | sh25_wangtaojie | 计算邮资 | C++ | 通过 | 0 MS | 248 KB | 421 | 2025-10-17 15:25:02 |
#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; }