Answer
2024-02-22 18:11:31
发布于:广东
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main()
{
int g,money = 8;
char ji;
cin>>g>>ji;
if(g <= 1000)
{
cout<<money;
return 0;
}
int tg = g - 1000;
if(tg % 500 > 0)
{
money += tg/500*4;
money += 4;
}
else money += tg/500*4;
if(ji == 'y') money += 5;
cout<<money;
return 0;
}
这里空空如也
有帮助,赞一个