There are x dormitories.
There are 4 people in each room, but 20 people can't arrange it.
So there are 4x+20 people.
There are 8 people in each room, and the last room is not empty and dissatisfied.
So x- 1 has eight people, and the last room has more than eight.
So 0