class Solution:

    def findDuplicate(self, nums: List[int]) ->int:
        dic = {}
        for i in range(len(nums)):
            if nums[i] not in dic.keys():
                dic[nums[i]] = 1
            else:
                return nums[i]

c8fd7662aa9608cca581b63520092c41f4cd4386
<mask token>

class Solution:
    <mask token>

class Solution:

    def findDuplicate(self, nums: List[int]) ->int:
        dic = {}
        for i in range(len(nums)):
            if nums[i] not in dic.keys():
                dic[nums[i]] = 1
            else:
                return nums[i]
