UVa 11727 resolvido