https://leetcode.com/problems/xor-operation-in-an-array/description/ Easy

Решение

class Solution {
    fun xorOperation(n: Int, start: Int): Int {
        var result = 0
		    repeat(n) { i -> result = result xor (start + 2 * i) }
		    return result
    }
}