[C++] 纯文本查看 复制代码 #include<bits/stdc++.h>
using namespace std;
int main(){
int a,p=0;
char b;
cin>>a>>b;
if(b=='y'){
p=p+5;
}
if(b=='n'){
p=p+0;
}
if(a<=1000){
p=p+8;
}
if(a>1000){
if((a-1000)%500==0){
p=p+(a-1000)/500*4+8;
}
else{
p=p+(a-1000)/500*4+12;
}
}
cout<<p;
} |