Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124332 | 柯轶炜 | 寻找第二小的数 | Python3 | Accepted | 35 MS | 3764 KB | 365 | 2025-07-11 11:46:50 |
def find_second_smallest(): C = int(input()) for _ in range(C): n = int(input()) nums = list(map(int, input().split())) unique_nums = sorted(list(set(nums))) if len(unique_nums) < 2: print("NO") else: print(unique_nums[1]) if __name__ == "__main__": find_second_smallest()