What is the least possible value of $q$? 
Five students take a test with ten multiple-choice questions. When the test is over, the five students have $9, 8, 7, 6,$ and $5$ correct answers, respectively. If there were $q$ questions on the test that a majority of the five students answered correctly, what is the least possible value of $q$?

I thought about taking cases based on what $q$ was. If $q = 0$, then this is impossible since we can't have $2x+y = 35$. How do we deal with the other cases?
 A: Since we are talking about minimum correct answers, so taking worst case is the best idea here. By the term Worst case I mean here that we are increasing the complexity of the situation. For example, it is possible that the guy with $5$ correct answers, $6$ correct answers......$9$ correct answers have given $5$ common correct answers (which were given by guy with 5 correct answers). But this is the lucky case not the worst case.
Just think that how many common correct answers can guy with $5$ and $6$ answers have under the worst case. Then do it till guy with $9$ answers.
After that, leave 5 and then do the same thing with $(6,7).......(6,9)$.
After doing so I think result should be $1$
Let us call guy with $n$ correct answers $AN$.
Worst case will look like as follow:
$A9$ gave answers of starting $9$ questions.
$A8$ gave answers of starting $8$ questions.
$A7$ gave answers of starting $7$ questions.
$A6$ gave answers of starting $6$ questions.
$A5$ gave answers of last $5$ questions.
Now, you can see that only question which his answered correctly by all the students is $6th$ question from starting. So minimum value of $q$ is $1$.
A: We want to maximize the number of questions that at least $3$ people got wrong, call this $r$.
The total number of wrong answers was $15$. This tells us that $r\leq 5$.
In fact $r=5$ is possible, look at the following grid:
$$\begin{array}{|c|c|c|c|c|}\hline
w & w & w & c & c \\
\hline
w & w & w & c & c \\
\hline
w & w & w & c & c\\
\hline
w & w & c & w & c\\
\hline
w & c & c & w & w\\
\hline
c & c & c & c & c\\
\hline
c & c & c & c & c\\
\hline
c & c & c & c & c\\
\hline
c & c & c & c & c\\
\hline
c & c & c & c & c\\
\hline
\end{array}$$
so maximum value of $r$ is $5$ and therefore minimum value of $q$ is also $5$.
A: Minimizing $q$ is the same as maximizing the number of answers which were answered incorrectly by the majority of the students. Note that there are $1 + 2 + 3 + 4 + 5 = 15$ wrong answers in total. This means that we can do no better than 5 questions answered wrong by a majority of students, since each answer-wrong-by-a-majority requires at least 3 students getting it wrong.
Now let's see if we can actually get 5:
            student
          |1|2|3|4|5|
        |1|*   *   *
        |2|  *   * *
question|3|  *   * *
        |4|    * * *
        |5|    * * *

where a * in the student $i$, question $j$ column means that the student who got $i$ questions wrong got question $j$ wrong. We see that we indeed can get to questions answered wrong by three students each, which means that $q = 10 - 5 = 5$.
