#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>using namespace std;int main(){ int key[128] = { 0 }; char str1[85]; char str2[85]; scanf("%s%s", str1, str2); int len1 = strlen(str1); int len2 = strlen(str2); for (int i = 0; i < len2; i++){ if (str2[i] >= 'a'&&str2[i] <= 'z'){ key[str2[i]] = 1; key[str2[i] - 32] = 1; } else{ if (str2[i] >= 'A'&&str2[i] <= 'Z'){ key[str2[i]] = 1; key[str2[i] + 32] = 1; } else{ key[str2[i]] = 1; } } } for (int i = 0; i < len1; i++){ if (!key[str1[i]]){ if (str1[i] >= 'a'&& str1[i] <= 'z'){ PRintf("%c", str1[i] - 32); key[str1[i]] = 1; key[str1[i]-32] = 1; } else{ if (str1[i] >= 'A'&& str1[i] <= 'Z'){ printf("%c", str1[i]); key[str1[i]] = 1; key[str1[i] + 32] = 1; } else{ printf("%c", str1[i]); key[str1[i]] = 1; } } } } return 0;}
新闻热点
疑难解答