文章

63

粉丝

0

获赞

40

访问

2.3k

头像
删除字符串2 题解:
P1027 贵州大学机试题
发布于2026年1月28日 16:18
阅读数 49

#include<bits/stdc++.h>
using namespace std;
int main(){
	string str;
	cin >> str;
	string keys[8]={"gzu","Gzu","gZu","gzU","GZu","GzU","gZU","GZU"};
	for(int i=0;i<8;i++){
		while(str.find(keys[i])!= string::npos){
			str.erase(str.find(keys[i]),3);
		}
	}
	cout<< str <<endl;
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发