提交时间:2021-05-22 13:47:26
运行 ID: 46
#include<iostream> using namespace std; int main(){ int x; char l; int d; cin>>x>>l; int s; if(x<=1000){ s=8; } else { d=x%500; x=x-1000; x=x/500; s=8+4*x; if(d!=0){ s+=4; } } if(l=='y'){ s+=5; } cout<<s; }