We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This game is equivalent to a "normal game of Nim" (https://en.wikipedia.org/wiki/Nim) starting with n heaps each having an initial size equal to the sum of the exponents in the factorization of m.
It just so happens that a very terse simplified solution exists for n heaps of the same initial size, but that is not trivial to prove.
I doubt the authors realize the complexity of this puzzle, when done right.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Tower Breakers
You are viewing a single comment's thread. Return to all comments →
This game is equivalent to a "normal game of Nim" (https://en.wikipedia.org/wiki/Nim) starting with n heaps each having an initial size equal to the sum of the exponents in the factorization of m. It just so happens that a very terse simplified solution exists for n heaps of the same initial size, but that is not trivial to prove. I doubt the authors realize the complexity of this puzzle, when done right.