Solution to the Predict the Number CodeEval's challenge.