B2048蒟蒻90分求助
查看原帖
B2048蒟蒻90分求助
488395
Proxima_Centauri楼主2022/7/12 19:28

下面是我的代码 求各位大佬帮忙改一下谢谢 有点丑······``` #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; }

2022/7/12 19:28
加载中...