The number 842587 (eight hundred forty-two thousand five hundred eighty-seven) is written in Roman numerals as follows: DCCCXLIIDLXXXVII