2 条题解
-
019220448 董文杰 (董文杰) LV 9 @ 2023-05-22 20:16:28
s = input() t = input() print(*[c if c not in t else '' for c in s], sep='')
-
02021-11-21 21:45:08@
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; getline(cin, s1); getline(cin, s2); bool flag = false; if ( s2.find(' ') != string::npos ) flag = true; for ( int i = 0; i < s1.size(); ) { if ( s2.find(s1[i]) != string::npos ) for ( int j = i; j < s1.size(); j ++ ) s1[j] = s1[j + 1]; else if ( flag && s1[i] == ' ' ) for ( int j = i; j < s1.size(); j ++ ) s1[j] = s1[j + 1]; else i ++ ; } printf("%s", s1.c_str()); return 0; }
- 1
信息
- ID
- 1062
- 难度
- 5
- 分类
- (无)
- 标签
- 递交数
- 593
- 已通过
- 185
- 通过率
- 31%
- 被复制
- 2
- 上传者