题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
import sys list1=[] for line in sys.stdin: a = line.split() list1.append(a[0]) # 从第二个数据开始检查是否有重复 list1=list1[1:] list2=[] for i in list1: if len(list2)==0 or (i not in list2): list2.append(i) # str转化成int然后进行排序 list3=[] for i in list2: list3.append(int(i)) list3.sort() # 逐个输出 for i in list3: print(i)