The number 840542 (eight hundred forty thousand five hundred forty-two) is written in Roman numerals as follows: DCCCXLDXLII