The number 42871 (forty-two thousand eight hundred seventy-one) is written in Roman numerals as follows: XLIIDCCCLXXI