Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
40384 chenyanda 计算邮资 C++ 通过 0 MS 248 KB 383 2024-02-09 22:08:04

Tests(1/1):


#include<iostream> using namespace std; int main() { int x; char a; cin>>x>>a; if(a=='y'){ if(x<=1000) { cout<<"13"; } if(x>1000){ x=x-1000; x=x-x%500; x=x/500+1; x=4*x+13; cout<<x; } } if(a=='n'){ if(x<=1000){ cout<<"8"; } if(x>1000){ x=x-1000; x=x-x%500; x=x/500+1; x=4*x+8; cout<<x; } } }


测评信息: