当前位置:网站首页>Pat 1050 string subtraction (20 points) string find

Pat 1050 string subtraction (20 points) string find

2022-06-25 21:34:00 Python ml

#include <iostream>
using namespace std;
int main() {
    
    string s1,s2;
    getline(cin,s1);
    getline(cin,s2);
    for(int i=0;i<s1.length();i++){
    
        if(s2.find(s1[i])==string::npos)
            printf("%c",s1[i]);
    }
    return 0;
}
原网站

版权声明
本文为[Python ml]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202181305135256.html