UVa 108 resolvido