#t230. 恰有一门课不及格的学生
恰有一门课不及格的学生
Exactly One Failed Subject
Problem Description
Given a student's Chinese and maths scores, determine whether exactly one of the two subjects is a failing grade (score less than 60).
Input Format
One line containing two integers between 0 and 100, the student's Chinese score and maths score, respectively.
Output Format
If exactly one of the two subjects is failing, output 1; otherwise output 0.
Sample Input
50 80
Sample Output
1
Hint
- "Exactly one failing" is the key: both failing is no good, and both passing is no good either.
- Think about how to express "exactly one of two conditions is true" — count how many are true? Or compare whether the two booleans differ?
- Check against the sample: 50 80 → 1.