You are viewing a single comment's thread. Return to all comments →
Python 3
from functools import reduce from operator import xor def sansaXor(arr: list[int]) -> int: return reduce(xor, arr[::2]) if len(arr) % 2 else 0
Seems like cookies are disabled on this browser, please enable them to open this website
Sansa and XOR
You are viewing a single comment's thread. Return to all comments →
Python 3