The gist of the riddle is this : Consider a barrel of 100 pints of wine. Then if you take 1 pint of wine out from this barrel and add 1 pint of water to the barrel how many pints of wine are there in the barrel.
At this point the answer is obviously 99.
But if you do this the 30 times and every time you take out a pint of liquid of the barrel you add a pint of water to it then, how many pints of wine is remaining in the barrel ?
The answer says : $\frac {99^{30}}{100^{29}}$
I don't understand why this gives us the solution.
Link to riddle : http://www.mathpuzzle.ca/Puzzle/The-Riddle-Of-The-Cellarer.html
Edit : Accidentally typed answer for amount of water in the barrel i.e( $100 - \frac {99^{30}}{100^{29}}$). Fixed it to amount of wine.
At every step, you remove $\frac{1}{100}$ of the barrel and replace it with water. So if there are $N$ pints of wine in the barrel, you remove $\frac{N}{100}$ pints of wine and replace it with water, so there are $\frac{99N}{100}$ pints of wine remaining. So the quantity starts with 100 pints, which becomes $\frac{99 \cdot 100}{100}$, which becomes $\frac{99^2 \cdot 100}{100^2}$, which becomes ..., which becomes $\frac{99^{30} \cdot 100}{100^{30}} = \frac{99^{30}}{100^{29}}$. In general, after $n$ removals, you have $\frac{99^n}{100^{n-1}}$ pints remaining.