A solution to the POJ 1004, very simple thouth