The number 31171 (thirty-one thousand one hundred seventy-one) is written in Roman numerals as follows: XXXICLXXI