提交时间:2021-05-23 08:21:27
运行 ID: 153
#include <iostream> #include <cmath> using namespace std; int main() { char a; int g, yuan; scanf("%d",&g); cin >> a; if(g <= 1000) { yuan = 0; } else { yuan = ceil((g - 1000) / 500.0); yuan *= 4; } if(a == 'y') { yuan += 5; } yuan += 8; cout << yuan; return 0; }