Rosetta Problems

Let's Play Nim

https://atcoder.jp/contests/arc105/tasks/arc105_d