Solved UVa 10882