Back

Stack of Coins 1C

Easy
Created: February 6, 2026

You and your friend are really lucky treasure hunters, because you’ve stumbled on another pirate’s treasure: an old chest filled with coins: 149 copper coins and 1 gold coin. As before, these old coins are no longer legal tender, so the copper ones are worthless. Only the gold coin is worth something due to its material.

To determine who gets the gold coin, your friend comes up with a game of wits. He stacks the 150 coins in a tall stack with the gold coin at the bottom. You and him will take turns taking anywhere between 3 to 12 coins from the top of the stack, all the way until the final coin is taken. If you reach 1 or 2 coins in the stack, he’ll take the gold coin, no matter whose turn it is to move (after all, you already won the 2 previous games). He lets you decide if you want to go first or second.

Should you go first or second? And what strategy do you use to ensure you’ll win the gold coin?

Hint

Try the previous puzzles first and see if you can extend the solution.

Solution

Choose to go second. After your friend makes a move, take 15x15 - x15x coins, where xxx is the number of coins he took.

Recapping the solution for Stack of Coins 1B

The trick to [puzzle

] is to notice that you want to find a “magic number” kkk such that:

  • Your friend can never remove kkk coins on his turn.
  • No matter how many coins your friend takes, you can make a corresponding moves such that both your moves result in removing kkk coins from the stack.

Then you’d want to ensure the stack of coins is a multiple of kkk whenever it’s your friend’s turn to move.

This time, though, we cannot simply make k=12+1=13k = 12 + 1 = 13k=12+1=13. This is because if your friend takes 11 or 12 coins on his turn, you cannot simply take 2 or 1 coin to bring the total down by 13 coins. Instead, kkk must be 15:

  • If he takes 333 coins, you take 121212.
  • If he takes 444 coins, you take 111111.
  • If he takes 555 coins, you take 101010.
  • ...
  • If he takes 121212 coins, you take 333.

However, notice that the number of coins in the stack is already a multiple of 15. Thus, you should let your friend move first.

Try These Next