He solved 30 questions.
He solved one question in one minute.
This if he continued at the speed and there are 40 minutes to solve the test and he leaves 10 minutes earlier. He is left with 30 minutes and one minutes per question . Therefore, he solved 30 question.