UVa 575 resolvido