1835. Find XOR Sum of All Pairs Bitwise AND

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1835

class Solution:
    def getXORSum(self, arr1: List[int], arr2: List[int]) -> int:
        a = reduce(xor, arr1)
        b = reduce(xor, arr2)
        return a & b