UVa 113 resolvido