首页 > 删除公共字符
头像 郑艺a
发表于 2026-03-08 20:47:39
import sys def solve(): s1 = list(str(input())) s2 = list(str(input())) for i in s2: for j in s1: if i == j: 展开全文
头像 makabk6
发表于 2025-12-17 21:49:23
#include <iostream> #include <bits/stdc++.h> #include <unordered_set> using namespace std; int main() { string s1,s2; getli 展开全文
头像 菜鸡要先飞
发表于 2025-09-26 14:52:38
首先分别定义s1和s2来代表两个字符串 然后使用set把s2拆分 使用for循环遍历,如果不在s2中就插入数组 最后组合一下输出 s1 = input() s2 = input() ans = [] nend_remove = set(s2) for i in s1: if not i in ne 展开全文

等你来战

查看全部