python就是简单模式 a = [] for line in sys.stdin: a.append(int(line)) a = a[1:] a.sort() front = '' for i in a: if i != front: print(i) front = i