下面是我的代码
求各位大佬帮忙改一下谢谢
有点丑······```
#include
#include
using namespace std;
int main()
{
int x;
char y;
cin >> x >> y;
int ans = 8;
if (y == 'y') ans += 5;
int temp = (x - 1000) / 500;
if ((x - 1000) % 500 != 0) temp++;
cout << ans + temp * 4 << endl;
return 0;
}