2. There are X people in the following situations:
x=6n+m (n=0, 1,2,3,...,m= 1,2,3,4,5)
The number of rooms is x/6=(6n+m)/6. Because the rooms are integers, the result needs to be rounded to n .. but according to the meaning of the question, at least n+ 1 rooms are needed.
The reason lies in m/6, because m
Similarly, in order to ensure that m+z/6 is equal to 0 when m=0, m+z
3. So z can only be equal to 5. The original formula can be rewritten as:
Number of rooms =x/6=(6n+m+5)/6 rounded. That is, (x+5)/6 is rounded.