题解 | #查找兄弟单词#
查找兄弟单词
https://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
from collections import Counter
words = input().split()[1:]
k = int(words.pop())
target = words.pop()
checker = Counter(target)
res = []
for word in words:
if word != target and Counter(word) == checker:
res.append(word)
res.sort()
print(len(res))
if len(res) > k - 1 >= 0:
print(res[k - 1])
