Solve the 'Valid Number' question