CodeEval challenge: MinimumCoins