The number 317871 (three hundred seventeen thousand eight hundred seventy-one) is written in Roman numerals as follows: CCCXVIIDCCCLXXI