Step 1: A,B,Q,R,T and U are males while rest of them are females. Females stay on an odd numbered floor whereas males are staying on an even numbered floor. It means C,D,E,F,P and S are females and stay on an odd numbered floor. E is not staying on second floor which has thirty eight rooms. neither floor 23rd nor floor 42nd has nineteen rooms. F stays on floor 23rd with only D. neither floor 23rd nor floor 42nd has twenty-four rooms. second floor has thirty eight rooms. S does not stay on 55th floor.
Step 2: Proceeding further with the remaining information, Since T is a male, it means he stays on an even numbered floor which has nineteen rooms. So T stays on 90th floor as there is no other possibility. D stays on the floor which has forty rooms so the 23rd floor has forty rooms. the floor which has seventeen rooms is an odd numbered floor but not 55th floor it means 97th floor has seventeen rooms and 55th and 42nd floors have twenty-four and thirty-three floors respectively as there is no other possibility.
Step 3: Proceeding with the remaining information, R stays on the floor which has thirty-three rooms. A with only B are staying on the same floor. It is given that males can stay on an even numbered floor. two of the given persons are living on each floor. it means A and B are staying on 2nd floor and R is staying on 42nd floor having thirty-three rooms. P does not stay on the same floor as S. since P and S are females it means S stays on 97th floor and P stays on 55th floor. C is not staying on the same floor as D. now as Q and U are male and their floors are not certain so either of them lives on 90th floor or on 42nd floor and as C and E are females so either of them lives with P or S.
So, we get our final solution as,
