题解 | #查找兄弟单词#

查找兄弟单词

http://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68

while 1:
    try:
        string = input().split()
        n = int(string[0])
        lst = string[1:n+1]
        word = string[n+1]
        word_num = int(string[-1])
        lst = [i for i in lst if (i != word and sorted(i) == sorted(word))]
        print(len(lst))
        lst.sort()
        print(lst[word_num-1])
    except:
        break

全部评论

相关推荐

但听说转正率很低,我现在有在实习了,好纠结要不要去
熬夜脱发码农:转正率低归低,但是实习的经历你可以拿着,又不是说秋招不准备了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务