1.题目介绍
1050
2.考察点,难度
字符串处理类,字符串字符统计count函数,难度易
3.解题代码
c
#include <bits/stdc++.h>
using namespace std;
int main(){
// freopen("D:\\PAT\\Clion\\in.txt","r",stdin);
string x,y,s="";
getline(cin,x);
getline(cin,y);
for(int i=0;i<x.length();i++){
if(count(y.begin(),y.end(),x[i])!=0){
continue;
}
s+=x[i];
}
cout<<s<<endl;
return 0;
}
4.原题地址
https://pintia.cn/problem-sets/994805342720868352/problems/994805429018673152