The smallest number of schools would be if all the schools entered the max amount of teams they could. So we first just want to say as many schools as possible entered 4 teams.
So here just divide 247 by 4.
That would be 61 R3
So we say that 61 schools entered with four teams. Now there are 3 teams extra. We can assign these to just one school, because a school can enter 3 teams. So then the total amount of schools entered in the XYZ contest, in this case, would be 62.