tipstar0125 / atcoder

atcoder
6 stars 0 forks source link

XORは繰り上がりのない足し算 #36

Open tipstar0125 opened 6 months ago

tipstar0125 commented 6 months ago

足し算はビット演算子を用いて以下のように表せる。 x+y=(x XOR y)+2(x AND y)

https://atcoder.jp/contests/abc238/editorial/3374