class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
return -sum(nums)+2*sum(set(nums))
class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
return -sum(nums)+2*sum(set(nums))
本文标题:136. Single Number
本文链接:https://www.haomeiwen.com/subject/otcqpttx.html
网友评论