当前位置:网站首页>1486. Array XOR operation

1486. Array XOR operation

2020-11-09 08:25:51 http://www.bing.com/searc....tin-round+rock+texas

Answer key

Routine simple questions

class Solution:
    def xorOperation(self, n: int, start: int) -> int:
        result = 0
        for i in range(n):
            result = result ^ (start + 2*i)
        return result

版权声明
本文为[http://www.bing.com/searc....tin-round+rock+texas]所创,转载请带上原文链接,感谢