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.
8.7m questions
11.3m answers