The number 31671 (thirty-one thousand six hundred seventy-one) is written in Roman numerals as follows: XXXIDCLXXI