#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
#
# @param numbers int整型一维数组
# @return int整型
#
class Solution:
def duplicate(self , numbers ):
# write code here
n = len(numbers)
if n == 0 or n == 1:
return -1
else:
for i in range(n):
if numbers[i] in numbers[i+1 : n]: # 切片,将当前元素和后面元素分开
return numbers[i]
break