added solution to uva problem 10703