题解 | #查找兄弟单词#
查找兄弟单词
https://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
import sys while 1: try: d=list(input().split(" ")) nn=int(d[0]) n=len(d) x=d[n-2] dijige=d[n-1] xiongdi=[] for i in range(1,nn+1): a=d[2] if d[i]!=x and sorted(str(x))==sorted(str(d[i])): xiongdi.append(d[i]) else: continue print(len(xiongdi)) print(sorted(xiongdi)[int(dijige)-1]) except: break