POJ#1727 Part 1, wrong answer