Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
29547 | lnx | 计算邮资 | C++ | Accepted | 0 MS | 240 KB | 291 | 2023-10-31 18:46:01 |
#include<iostream> using namespace std; int main() { int a; char b; cin>>a>>b; int c=4*((a-1000)/500+1)+8; if(a>1000&&b=='y') { cout<<c+5; } else if(a>1000&&b=='n') { cout<<c; } else if(b=='y') { cout<<"13"; } else { cout<<"8"; } return 0; }