题解 | #寻找奇数#
寻找奇数
http://www.nowcoder.com/practice/849b9e545f4742398d278f5dc4e003d2
n = int(input()) arr = list(map(int,input().strip().split())) arr.sort() tag = True for i in range(1,len(arr),2): if arr[i] == arr[i - 1]: continue else: tag = False print(arr[i - 1]) break if tag: print(arr[-1])