The number 40477 (forty thousand four hundred seventy-seven) is written in Roman numerals as follows: XLCDLXXVII