Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146277 左锶焜 寻找第二小的数 C++ Compile Error 0 MS 0 KB 366 2026-01-27 19:37:30

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