The number 39971 (thirty-nine thousand nine hundred seventy-one) is written in Roman numerals as follows: XXXIXCMLXXI