3. There are more than 20 but fewer than 30 people in the class, and everyone has a different birthday. Petya said: "There are twice as many people older than me as there are younger than me in the class." Katya said: "There are three times fewer people older than me as there are younger than me in the class." How many people are in the class if Petya and Katya are both correct?
Answer: 25.

Solution: From Petya's words, it is clear that without him, the number of students in the class is a multiple of 3 (2 parts + 1 part). That is, together with him, there can be 22, 25, or 28 people in the class. Similarly, from Katya's words, it is clear that without her, the number of students in the class is a multiple of 4. The numbers that fit are 21, 25, 29. Since both statements are true, the number that satisfies both conditions is 25.

Grading criteria: Correct answer with verification - 1 point.

If the solution is by enumeration and one of the cases from 21 to 29 is missed without explanation, then 1 point.

Correct answer with all necessary explanations - 7 points.