The number 318731 (three hundred eighteen thousand seven hundred thirty-one) is written in Roman numerals as follows: CCCXVIIIDCCXXXI