文章
116
粉丝
0
获赞
119
访问
6.4k
#include<bits/stdc++.h> using namespace std; int main(){ string str; while(getline(cin,str)){//字符串可能包含空格,使用getline读取更为稳妥 char c; cin >> c; str.erase(remove(str.begin(), str.end(), c), str.end()); cout << str << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发