Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
31625 | 闻航 | 计算邮资 | C++ | Accepted | 0 MS | 252 KB | 369 | 2023-11-19 20:30:23 |
#include<iostream> using namespace std; int main() { int n; char c; double s; cin>>n>>c; if(n<=1000) { s=8; } else if(n>1000) { if((n-1000)%500==0) s=8+((n-1000)/500)*4; else s=8+((n-1000)/500+1)*4; } if(c=='y') { s+=5; } cout<<s<<endl; return 0; }