This is simple. Don't overthink it.
Take 24 and divide it by 3
The answer is 8.
There are 8 groups with 3 students in it. No more than 5 and no less than 3.
9.4m questions
12.2m answers