There are two math exams called A and B. 2014 students took the A exam and/or the B exam. Each student took one or both exams, so the total number of exam papers was between 2014 and 4028, inclusive. The score for each exam is an integer from 0 through 40. The average score of all the exam papers was 20. The grade for a student is the best score from one or both exams that she took. The average grade of all 2014 students was 14. Let be the [i]greatest[/i] possible number of students who took both exams. Let be the [i]least[/i] possible number of students who took both exams. Compute .
Problem 1344
Official solution
1. Define Variables and Given Information:
- Let be the total number of students.
- Let be the number of students who took both exams.
- Let be the total score of all students who took only one exam.
- Let be the total score of all students who took both exams.
- Let be the total score of the worse exams of the students who took both exams.
We are given:
- The average score of all exam papers is 20.
- The average grade of all students is 14.
2. Formulate Equations:
- The total number of exam papers is .
- The total score of all exam papers is .
- The total grade of all students is .
Therefore, we have:
3. Subtract the First Equation from the Second:
4. Establish Inequalities:
- Since (because the worst score for each student who took both exams is at most 40):
Since must be an integer:
5. **Upper Bound for :**
- Since and :
Since must be an integer:
6. **Compute :**