题解 | #查找兄弟单词#
查找兄弟单词
http://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
while True:
try:
words = input().split()
n = int(words[-1])
word = words[-2]
words = words[1:-2]
ans = []
for c in words:
if len(c) != len(word) or c == word or sorted(c) != sorted(word):
continue
ans.append(c)
ans = sorted(ans)
print(len(ans))
print(ans[n-1])
except:
break