UVa 382 resolvido