提交时间:2021-07-13 09:35:04
运行 ID: 525
#include <iostream> #include <cmath> using namespace std; int main(){ float a; char s; cin>>a>>s; if(a<=1000){ if(s=='n'){ cout<<8; } if(s=='y'){ cout<<8+5; } } if(a>1000){ float n; n=a-1000; n=n/500; n=ceil(n); n=n*4; if(s=='n'){ cout<<8+n; } if(s=='y'){ cout<<8+5+n; } } }