The number 31271 (thirty-one thousand two hundred seventy-one) is written in Roman numerals as follows: XXXICCLXXI