13 条题解

  • -1
    @ 2024-7-23 11:57:57
    #include<bits/stdc++.h>//定义头一个文件
    using namespace std;
    int main(){
        string s,t;//定义字符串
        getline(cin,s);//输入字符串
        getline(cin,t);
        for(int i=0;i<t.size();i++){//利用for循环判断
            int pos=0;
            while(pos!=-1){
                pos=s.find(t[i]);//利用while循环判断
                if(pos!=-1) s.erase(pos,1);//用erase函数判断
            }
        }
        cout<<s;//输出s
        return 0;
    }
    

    信息

    ID
    344
    时间
    1000ms
    内存
    64MiB
    难度
    8
    标签
    递交数
    115
    已通过
    21
    上传者