UVa 10004 resolvido