136. Single Number

class Solution(object):
    def singleNumber(self, nums):
    """
    :type nums: List[int]
    :rtype: int
    """
    return -sum(nums)+2*sum(set(nums))

你可能感兴趣的:(136. Single Number)