In a Mathematics test, there were $40$ questions. $1$ mark is deducted for every wrong answer and $2$ marks are awarded for every correct answer. Tom received a score of $71$ and he calculated that he had $31$ correct answers.  This was his method of calculation:  Assume all answers were correct,  Total score $=2\times40=80$  Difference in total score $=80-71=9$  Difference in marks $=2-1=1$  No. of wrong answers $=9\div1=9$  No. of correct answers $=40-9=31$  His friend, Jimmy told him that he is incorrect. If Tom was incorrect, where is his mistake, and how many questions did he answer wrongly? 
Overseas Competition->Knowledge Point->Counting Modules->Inclusion-Exclusion Principle