solved Problem24