问题 解答 异或 时间复杂度: O(N) class Solution: def singleNumber(self, nums: List[int]) -> int: res = 0 for i in nums: res = res ^ i return res 调试结果: