题解 | #明明的随机数#

明明的随机数

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

# 获取输入
n = int(input())

# 获取连续的随机数
sjs = []
for i in range(n):
    a = int(input())
    sjs.append(a)
# 去重   
new_sjs = list(set(sjs))
new_sjs.sort() #默认从小到大排序
for item in new_sjs:
    print(item)

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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