题解 | #明明的随机数#

明明的随机数

http://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0

import sys

stack = []
for x in sys.stdin:
    if x.strip():
        stack.append(int(x.strip()))
stack.reverse()
        
while stack:
    li = set()
    num = stack.pop()
    for i in range(num):
        li.add(stack.pop())
    li = sorted(li)
    for x in li:
        print(x)
全部评论

相关推荐

昨天 13:16
湖南工学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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