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