提交时间:2026-01-04 17:32:04

运行 ID: 81387

#include<iostream> using namespace std; int main(){ int weight; char express; cin>>weight>>express; int cost=8; if(weight>1000){ int excess=weight-1000; int extra_units=(excess+499)/500; cost+=extra_units*4; }if (express=='y') { cost+=5; }cout<<cost<<endl; return 0; }