UVa 10050 resolvido