UVa 10008 resolvido