The number 42787 (forty-two thousand seven hundred eighty-seven) is written in Roman numerals as follows: XLIIDCCLXXXVII