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