The number 318642 (three hundred eighteen thousand six hundred forty-two) is written in Roman numerals as follows: CCCXVIIIDCXLII