The number 842031 (eight hundred forty-two thousand thirty-one) is written in Roman numerals as follows: DCCCXLIIXXXI