What's wrong in my code? result is ok but it doesn't meet the requirement.