def function(N): result = [] for i in range(int(N)): flag = True while flag: s = input() if s.isdigit() and 1 <= int(s) <= 500: result.append(int(s)) flag = False else: continue #去重 result1 = list(set(result)) result1.sort() for j in result1: print(j) XX = True while XX: N = input() if N.isdigit() and 1 <= int(N) <= 1000: function(N) XX = False else: continue
1

相关推荐

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