UVa 10603 - wrong answer?