Solved UVa 10730