The number 310842 (three hundred ten thousand eight hundred forty-two) is written in Roman numerals as follows: CCCXDCCCXLII