The number 31504 (thirty-one thousand five hundred four) is written in Roman numerals as follows: XXXIDIV