
'''simple docstring'''

__snake_case:  Optional[Any]   							=			[
    (10_00, "M"),
    (9_00, "CM"),
    (5_00, "D"),
    (4_00, "CD"),
    (1_00, "C"),
    (90, "XC"),
    (50, "L"),
    (40, "XL"),
    (10, "X"),
    (9, "IX"),
    (5, "V"),
    (4, "IV"),
    (1, "I"),
]






def 	_snake_case						(      A_       :    str   ):
  """simple docstring"""







  a_      :	Optional[int]      =							{"""I""": 1, """V""": 5, """X""": 10, """L""": 50, """C""": 100, """D""": 500, """M""": 1000}
  a_      :	Dict      =							0
  a_      :	int      =							0
  while place < len(lowerCAmelCase__   ):
    if (place + 1 < len(lowerCAmelCase__   )) and (vals[roman[place]] < vals[roman[place + 1]]):
      total += vals[roman[place + 1]] - vals[roman[place]]
      place += 2
    else:
      total += vals[roman[place]]
      place += 1
  return total






def 	_snake_case						(      A_       :    int   ):
  """simple docstring"""







  a_      :	int      =							[]
  for arabic, roman in ROMAN:
    ((a_)      , (a_))      :	int      =							divmod(lowerCAmelCase__     ,		lowerCAmelCase__   )
    result.append(roman * factor   )
    if number == 0:
      break
  return "".join(lowerCAmelCase__   )


if __name__ == "__main__":
    import doctest

    doctest.testmod()




'''simple docstring'''

from math import factorial

__snake_case:  List[Any]								=			{str(d): factorial(d) for d in range(10)}






def 	_snake_case						(      A_       :    int   ):
  """simple docstring"""







  return sum(DIGIT_FACTORIAL[d] for d in str(A_   )   )






def 	_snake_case						(      ):
  """simple docstring"""







  a_      :	Union[str, Any]      =							7 * factorial(9   ) + 1
  return sum(i for i in range(3     ,		A_   ) if sum_of_digit_factorial(A_   ) == i   )


if __name__ == "__main__":
    print(F"""{solution() = }""")


