You are given a number of balls and one balance scale. One of the
ball is slightly denser than the others. The balance scale will give you 3
output; left, right or balanced. If Z is 8, how many times you should use
the balance scale in order to find the denser ball? Please use the scale as
minimal as possible. What about if Z is 26? 80? Or 240?