PROJECT EULER · #0488
Unbalanced Nim
Alice and Bob have enjoyed playing Nim every day. However, they finally got bored of playing ordinary three-heap Nim.
So, they added an extra rule:
- Must not make two heaps of the same size.
The triple
Under this extra rule,
To illustrate:
- Alice moves to
- Bob moves to
- Alice moves to
- Bob moves to
Unlike ordinary three-heap Nim,
For an integer
For example,
We can also verify that
Find the last
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.