Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147947 姜景文 寻找第二小的数 C++ Compile Error 0 MS 0 KB 363 2026-02-09 09:15:41

Tests(0/0):


Code:

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()


Run Info:

Main.cc:1:1: error: 'def' does not name a type
 def find_second_smallest(): 
 ^