文章
1
粉丝
0
获赞
0
访问
60
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string toLower(string s) {
transform(s.begin(), s.end(), s.begin(), ::tolower);
return s;
}
void removeGZU(string &s) {
string target = "gzu";
size_t pos;
while (true) {
string lowerS = toLower(s);
pos = lowerS.find(target);
if (pos == string::npos) break;
s.erase(pos, target.length());
}
}
int main() {
string s;
if (getline(cin, s)) {
removeGZU(s);
cout << s << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发