Task 2. In the $1^{\text{st}}$ grade, 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 4. Among the answers received were: $(10,14),(13,11),(13,19)$. How many boys and how many girls are in the class?
Answer: 14 boys and 15 girls.

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

The second numbers in the answers of B and C differ by 8, so they are both incorrect. Thus, the number of classmates for B and C is 13, and the number of female classmates is 15.

If B and C are girls, then there are 13 boys and 16 girls in the class. In this case, boy A would then have 12 classmates and 16 female classmates, and his answer $(10,14)$ would contradict the condition. Therefore, B and C are boys, and there are 14 boys and 15 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-4, d),(m+4, d),(m, d-4),(m, d+4)$. Then, if this child is a boy, there are four possible combinations of the number of boys and girls in the class: $(m-3, d),(m+5, d),(m+1, d-4)$, and $(m+1, d+4)$. Similarly, if this child is a girl, the possible combinations in this case are: $(m-4, d+1),(m+4, d+1),(m, d-3),(m, d+5)$.

Thus, each answer gives us eight possible combinations of the number of boys and girls in the class, one of which must be correct:

for $(10,14)$ these are $(7,14),(15,14),(11,10),(11,18),(6,15),(14,15),(10,11),(10,19)$;

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

for $(13,19)$ these are $(10,19),(18,19),(14,15),(14,23),(9,20),(17,20),(13,16),(13,24)$.

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