If you haven't done any of the other
coin problems, then you might want to go back and try those now, this one is very difficult, even if you have figured out the other ones.
This time, as the title implies, there are 39 coins, and one is fake. You have a balance scale, which can be used 4 times.
How would you find the fake coin?
Divide the 39 into 3 piles of 13 coins. Put the first two piles on each side of the scale, if the scales are even then the fake coin is in the third pile otherwise the coin is in the pile that weighs less.
Take pile with the fake coin and divide it into two piles of 6 coins leaving one coin out. Weigh the two piles if the scales are even then the coin you left out is fake, otherwise the coin is in the pile that weighs less.
Take pile with the fake coin and divide it into three piles of 2 coins. Put the first two piles on each side of the scale, if the scales are even then the fake coin is in the third pile otherwise the coin is in the pile that weighs less.
Take the last two coins and weigh them. The one that weigh less is the fake.
In theory it is possible based on this method to find the coin after two weighs but if we must weigh 4 times we can always grab a few coins and weigh them just for fun.