1029 旧键盘 (20分)
https://pintia.cn/problem-sets/994805260223102976/problems/994805292322111488
#include <iostream> #include <cctype> using namespace std; int main() { string str1,str2,ans; cin>>str1>>str2; for(int i=0;i<str1.length();i++) if((str2.find(str1[i])==string::npos)&&ans.find(toupper(str1[i]))==string::npos) ans+=toupper(str1[i]); cout<<ans<<endl; return 0; }
原文地址:https://www.cnblogs.com/jianqiao123/p/12246863.html
时间: 2024-11-05 23:22:59