2. (5 points) On Valentine's Day, every student in the school gave each female student a valentine. It turned out that the number of valentines was 30 more than the total number of students. How many valentines were given?
A number or a short expression. Spacing, $ signs and \frac vs / are all fine.
Official solution
Answer: 64
Solution: Let x,y be the number of boys and girls in the school, respectively. According to the problem, xy=x+y+30. Then (x−1)(y−1)=31. Therefore, the numbers x−1 and y−1 are 1 and 31. The number of valentines is 2⋅32=64.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic, difficulty and ordering added
by this site.