python思路: while True: try: a = input() b = a.split(" ") #字符串分解为列表 k = int(b[-1]) #获取k值 target_str = b[-2] #获取目标字符串 bro_list = b[1:-2] #获取筛选列表 res_list=[] #兄弟字符串列表 for i in bro_list: if sorted(target_str) == sorted(i) and target...