The number 31940 (thirty-one thousand nine hundred forty) is written in Roman numerals as follows: XXXICMXL