Dear mathematicians, I need help !

Yes 10 is correct. Thats assuming you meant 25 nights though. If you meant 25 including the day you arrive and leave, or including neither the day you arrive nor leave, then being completely fair won't be possible.

The simplest way to timetable this would be ensuring everyone spends equal time in each bed, for example by 'cycling everyone around' every 5 days:

  • Suppose the 5 people are called A, B, C, D and E. Number the 5 beds 1, 2, 3, 4, 5.
  • At the start A has bed 1, B has bed 2, etc.
  • After 5 nights, cycle everyone to the bed with the number 1 bigger than the one were at before (note: the person with bed 5 would cycle back round to bed 1). So to be clear, on the 6th night, A has bed 2, B has bed 3, C has bed 4, D has bed 5, E has bed 1.
  • Every 5 nights, repeat this.

This way everyone spends 5 days in each bed. Thus they will each spend 10 days in the room with 10 beds.

/r/mathematics Thread