#include<cstdio>
#include<cstring>
char str1[10010], str2[10010];
bool HashTable[128];
int main(){
fgets(str1,10010,stdin);
fgets(str2,10010,stdin);
int len1 = strlen(str1);
int len2 = strlen(str2);
for(int i = 0; i < len2; i++){
HashTable[str2[i]] = true;
}
for(int j = 0; j < len1; j++){
if(HashTable[str1[j]] == false){
printf("%c", str1[j]);
}
}
return 0;
}
原文地址:https://www.cnblogs.com/zjsaipplp/p/10425241.html
时间: 2024-11-05 11:54:13