solved uva 10038 - Jolly Numbers