Solve valid number question