def int_to_numeral(n: int) -> str:
    """Returns the minimal Roman numeral representation of the integer n."""

    numerals = []

    while n >= 1000:
        numerals.append('M')
        n -= 1000

    if n >= 900:
        numerals.append('C')
        numerals.append('M')
        n -= 900
    elif n >= 500:
        numerals.append('D')
        n -= 500
    elif n >= 400:
        numerals.append('C')
        numerals.append('D')
        n -= 400

    while n >= 100:
        numerals.append('C')
        n -= 100

    if n >= 90:
        numerals.append('X')
        numerals.append('C')
        n -= 90
    elif n >= 50:
        numerals.append('L')
        n -= 50
    elif n >= 40:
        numerals.append('X')
        numerals.append('L')
        n -= 40

    while n >= 10:
        numerals.append('X')
        n -= 10

    if n >= 9:
        numerals.append('I')
        numerals.append('X')
        n -= 9
    elif n >= 5:
        numerals.append('V')
        n -= 5
    elif n >= 4:
        numerals.append('I')
        numerals.append('V')
        n -= 4

    while n >= 1:
        numerals.append('I')
        n -= 1

    return ''.join(numerals)