Task 2. In the $1^{\text{st}}$ grade class, each child was asked to write down two numbers: the number of their classmates and the number of their female classmates (in that exact order; the child does not count themselves). Each child wrote one number correctly, and the other number was off by exactly 2. Among the answers received were: $(13,11),(17,11),(14,14)$. How many boys and how many girls are in the class?
Answer: 15 boys and 12 girls.

Solution. First solution. Let's denote the children who gave the answers (13,11), (17,11), (14,14) as A, B, and C, respectively. Note that if there are $m$ boys in the class, then the first number in the answers of the girls has the same parity as $m$, and in the answers of the boys - the opposite. Therefore, children A and B are of the same gender, and C is of the other gender.

The first numbers in the answers of A and B differ by 4, so they are both incorrect. Thus, the number of classmates for A and B is 15, and the number of female classmates is 11.

If A and B are boys, then there are 16 boys and 11 girls in the class. In this case, girl C would have 16 classmates and 10 female classmates, and her answer (14,14) would contradict the condition. Therefore, A and B are girls, and there are 15 boys and 12 girls in the class.

Second solution. Suppose a child wrote the numbers $(m, d)$. If he wrote both numbers correctly, he would have written one of the four options: $(m-2, d),(m+2, d),(m, d-2),(m, d+2)$. Then, if this child is a boy, there are four possible options for the number of boys and girls in the class: $(m-1, d),(m+3, d),(m+1, d-2)$, and $(m+1, d+2)$. Similarly, if this child is a girl, the possible options in this case are: $(m-2, d+1),(m+2, d+1),(m, d-1),(m, d+3)$.

Thus, each answer gives us eight possible options for how many boys and girls could be in the class, one of which must be correct:

for $(13,11)$ these are $(12,11),(16,11),(14,9),(14,13),(11,12),(15,12),(13,10),(13,14)$;

for $(17,11)$ these are $(16,11),(20,11),(18,9),(18,13),(15,12),(19,12),(17,10),(17,14)$;

for $(14,14)$ these are $(13,14),(17,14),(15,12),(15,16),(12,15),(16,15),(14,13),(14,17)$.

It remains to note that only the option $(15,12)$ appears in all three rows.