文章
10
粉丝
578
获赞
16
访问
110.4k
#include
using namespace std;
int main() {
// freopen("1.txt", "r", stdin);
string s;
while(cin >> s) {
int size = s.size();
int i;
//扩充防止遍历越界
s += " ";
for(i = 0; i < size; i++) {
if(!((s[i] == 'g' || s[i] == 'G') && (s[i + 1] == 'z' || s[i + 1] == 'Z') && (s[i + 2] == 'u' || s[i + 2] == 'U')) ) {
cout << s[i];
} else {
i += 2;
}
}
cout << endl;
}
}
登录后发布评论
感谢分享,给你点个赞