class Solution:
    def missingNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        res = len(nums)
        for i, num in enumerate(nums):
            res^= (num^i)
        return res

if __name__ == '__main__':
    print(Solution().missingNumber([9,6,4,2,3,5,7,0,1]))
    

b8d00235121a60cbe31511a75eaf239638e45c95
<mask token>

class Solution:
    <mask token>


<mask token>

class Solution:

    def missingNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        res = len(nums)
        for i, num in enumerate(nums):
            res ^= num ^ i
        return res


<mask token>

class Solution:

    def missingNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        res = len(nums)
        for i, num in enumerate(nums):
            res ^= num ^ i
        return res


if __name__ == '__main__':
    print(Solution().missingNumber([9, 6, 4, 2, 3, 5, 7, 0, 1]))

class Solution:
    def missingNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        res = len(nums)
        for i, num in enumerate(nums):
            res^= (num^i)
        return res

if __name__ == '__main__':
    print(Solution().missingNumber([9,6,4,2,3,5,7,0,1]))
    
