UVa 10346 resolvido