When a teacher counted her students in groups of 4, there were two students left over. When she counted them in groups of 5, she had 1 student left over. If 15 of her students were girls and she had more girls than boys, how many students did she have?
Let n be the number of students. We know that
n = 2 (mod 4)
n = 1 (mod 5)
15 students are girls, so there is a maximum of 29 students.
One solution for n is 26. So, the teacher has 26 students.