Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
112639 | 施宸雨 | 寻找第二小的数 | Python3 | Accepted | 38 MS | 3784 KB | 497 | 2025-03-09 19:43:42 |
c = int(input()) NO2 = [] def are_all_elements_equal(lst): return len(set(lst)) == 1 def find(n): a = 0 b = 1 numbers = [int(num) for num in input().split()] numbers.sort() if are_all_elements_equal(numbers):NO2.append("NO") else: while numbers[a] == numbers[b]: a += 1 b += 1 NO2.append(numbers[b]) for i in range(c): find(int(input())) for i in range(len(NO2)): print(NO2[i],end = " ")