The number 40271 (forty thousand two hundred seventy-one) is written in Roman numerals as follows: XLCCLXXI