Most Roman Numerals

More Details

Here are the numbers up to 15 in Roman numerals:

RomanNumeral[Range[15]]

The longest of these are VIII and XIII.

What Your Function Should Do

Write a function called FindLongestRomanNumeral that takes as input a positive integer n and returns the first base-10 number less than or equal to n whose Roman numeral representation is the longest.

FindLongestRomanNumeral[100]

More Examples

FindLongestRomanNumeral[15]

FindLongestRomanNumeral[500]

FindLongestRomanNumeral[max_Integer?Positive]:=