# 112. 挑战boss 本题题意有点绕,注意看一下 题目描述中的【提示信息】,但是在笔试中,是不给这样的提示信息的。 简单模拟: ```CPP #include using namespace std; int main() { int n, a, b, k = 0; cin >> n >> a >> b; string s; cin >> s; int result = 0; for (int i = 0; i < s.size(); i++) { int cur = a + k * b; result += cur; ++k; if (s[i] == 'x') k = 0; } cout << result << endl; return 0; } ```