Assuming there are three possibilities for an answer to a question: True, False, Not Answered.
So total possible answers: $3^5$, one of which will be the correct solution, hence total allowed possible answers: $3^5 -1$
Hence maximum students possible: $3^5-1$.
If all the students answers all the questions then total possibilities will be 2, true and false and the aswer will be $2^5-1$
Please correct me if I am wrong.