题解 | #查找兄弟单词#
查找兄弟单词
http://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
item = input()
n = int(item.split(' ')[0])
k = int(item.split(' ')[-1])
word = item.split(' ')[-2]
items = item.split(' ')[1:-2]
a = []
new =[]
for i in range(n):
if items[i] != word and sorted(items[i]) == sorted(word):
a.append(items[i])
new = sorted(a)
if k > len(new):
print(str(len(a)))
else:
print(str(len(a))+'\n'+str(new[k-1]))