The number 31023 (thirty-one thousand twenty-three) is written in Roman numerals as follows: XXXIXXIII