| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72662 | sh25_zhuwy | 计算邮资 | C++ | 通过 | 1 MS | 248 KB | 372 | 2025-11-02 13:44:24 |
#include<bits/stdc++.h> using namespace std; int main() { int weight,fee; char a; cin>>weight>>a; bool whether=(a=='y'); if(weight<=1000) { fee=8; } else if(weight>1000) { int k=weight-1000; if(k%500==0) { k=k/500; } else { k=k/500+1; } fee=8+k*4; } if(whether) { fee=fee+5; } cout<<fee; return 0; }