At the beginning of the school year in Hogwarts, Professor Snape observed that:
Out of any group of 17 students from his class, there is at least one student from Gryffindor;
Out of any group of 7 students from the class, there are at least two students from two different
houses.
At most how many students attend Professor Snape’s class?
Note: There are four houses in Hogwarts: Gryffindor, Hufflepuff, Ravenclaw, Slytherin.
A) 22 B) 18 C) 24 D) 28 E) Impossible to say