Your question is a bit unclear, however, I will try to answer as is.
He wants 512 rooms, equally divided between 3 floors. Thus:
The number of rooms on one floor is 512/3
However, that is not coming out to be a whole number! Please review the data you have presented.