Here's why:
* Numbers and nouns: When a number (like "thirty-first") is used as an adjective describing a noun (like "floor"), they are generally not hyphenated.
* Exceptions: Hyphens are sometimes used for numbers between 21 and 99 when they are followed by a noun that starts with a vowel. However, this rule doesn't apply to "floor."
So, the correct way to write it is "thirty-first floor."