The number 30842 (thirty thousand eight hundred forty-two) is written in Roman numerals as follows: XXXDCCCXLII