Suppose every student answers 0. Then the teach can pass one of them and fail the others.

]]>Every student answers with 0. If the teacher ranks them all as failed, in the end it will be every student having given the correct answer but marked as failed. If the teacher ranks someone as passed, it’s a case of a student having given an incorrect answer but marked as passed. Either way, the teacher is disqualified. ]]>

The strategy the students agree on is follows: the first student answers ’99’. If the teacher announces this student passes, then all subsequent students answer ’99’. One student must be failed despite giving the correct answer and the teacher is dismissed.

If, however, the teacher announces that the first student fails, then the next student instead answers ’98’. The students repeat the same steps as above, either repeating the answer once a student has been passed or decreasing their answer by one on a fail. One student is always failed despite giving a correct answer and the teacher is dismissed.

I shall not provide a formal proof, but the reason this strategy works is because there are 100 students, and the teacher must select an x in [0, 99] for the number of students to pass. There are |x| = 100 options for the teacher to select. If the teacher selects x = 0, then all 100 students are failed, including the last student who answers ‘0’. For any x the teacher selects, there will be x + 1 students answering ‘x’. By the pigeonhole principle, one of these students must be failed despite giving the correct answer.

]]>If the teacher grades all as ‘pass’ then they will all technically be incorrect but that doesn’t matter since they already passed. Otherwise, since everyone answers one less than the possible maximum, the last one who does not get a “pass” grade gets the right answer.

]]>Oh, and what if the smallest number not mentioned is 100, because all numbers in [0; 99] have been mentioned exactly once? Then she grades “1” as the correct answer, and the remaining 99 incorrect. The inspector will be satisfied.

Therefore, even if the teacher is not clairvoyant, she can achieve the same result by pure chance.

]]>