Answer: 12 rooms
Step-by-step explanation:
Let's say that the first 26 people will occupy each of the 26 rooms. This means that, so far, there's one person per room.
There are 40-26 = 14 people left. Let's say those 14 people occupy the first 14 rooms. This means that the first 14 rooms now have 2 people in them per room. The remaining 26-14 = 12 rooms still have one person per room.