题解 | #查找兄弟单词#
查找兄弟单词
https://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
while True: try: s = input().split() n = int(s[0]) x = s[-2] k = int(s[-1]) xx = s[1:-2] # 兄弟单词 ls = [] for i in xx: if i == x: continue elif i != x and sorted(i) == sorted(x): ls.append(i) print(len(ls)) print(sorted(ls)[k-1]) # 第k个单词的位置是k-1 except: break