I = input().split() R = input().split()[1:] 对R去重并排序,前提要是数字排序 R = list(sorted(map(lambda x: int(x), set(R)))) result = [] # 总容器 分别 拿R判断 I中元素是否符合规则 for r in R: r = str(r) line = [] for ind, val in enumerate(I[1:]): if r in val: line.extend([ind, val]) if line: line = [r, len(line)//2] + line result.e...