The number 31771 (thirty-one thousand seven hundred seventy-one) is written in Roman numerals as follows: XXXIDCCLXXI