The number 31187 (thirty-one thousand one hundred eighty-seven) is written in Roman numerals as follows: XXXICLXXXVII