Add solution 1486

This commit is contained in:
YDZ
2021-05-07 21:21:21 +08:00
parent 2a115eccc3
commit 5f6ea09570
26 changed files with 990 additions and 774 deletions

View File

@ -0,0 +1,9 @@
package leetcode
func xorOperation(n int, start int) int {
res := 0
for i := 0; i < n; i++ {
res ^= start + 2*i
}
return res
}