The number 45871 (forty-five thousand eight hundred seventy-one) is written in Roman numerals as follows: XLVDCCCLXXI