"""simple docstring"""






import os

__lowerCAmelCase					: Optional[int]      ={"""I""": 1, """V""": 5, """X""": 1_0, """L""": 5_0, """C""": 1_0_0, """D""": 5_0_0, """M""": 1_0_0_0}


def     UpperCAmelCase__ (       lowerCAmelCase__  :Tuple	)				->					int:
      '''simple docstring'''


      lowercase														=			0

      lowercase														=			0
      while index < len(lowerCAmelCase__	) - 1:
            lowercase														=			SYMBOLS[numerals[index]]
            lowercase														=			SYMBOLS[numerals[index + 1]]
            if current_value < next_value:
                  total_value -= current_value
            else:
                  total_value += current_value
            index += 1
      total_value += SYMBOLS[numerals[index]]

      return total_value


def     UpperCAmelCase__ (       lowerCAmelCase__  :Union[str, Any]	)				->					str:
      '''simple docstring'''


      lowercase														=			""

      lowercase														=			num // 1_0_0_0
      numerals += m_count * "M"
      num %= 1_0_0_0

      lowercase														=			num // 1_0_0
      if c_count == 9:
            numerals += "CM"
            c_count -= 9
      elif c_count == 4:
            numerals += "CD"
            c_count -= 4
      if c_count >= 5:
            numerals += "D"
            c_count -= 5
      numerals += c_count * "C"
      num %= 1_0_0

      lowercase														=			num // 1_0
      if x_count == 9:
            numerals += "XC"
            x_count -= 9
      elif x_count == 4:
            numerals += "XL"
            x_count -= 4
      if x_count >= 5:
            numerals += "L"
            x_count -= 5
      numerals += x_count * "X"
      num %= 1_0

      if num == 9:
            numerals += "IX"
            num -= 9
      elif num == 4:
            numerals += "IV"
            num -= 4
      if num >= 5:
            numerals += "V"
            num -= 5
      numerals += num * "I"

      return numerals


def     UpperCAmelCase__ (       lowerCAmelCase__  :Optional[int] = "/p089_roman.txt"	)				->					int:
      '''simple docstring'''


      lowercase														=			0

      with open(os.path.dirname(lowerCAmelCase__	) + roman_numerals_filename	) as filea:
            lowercase														=			filea.readlines()

      for line in lines:
            lowercase														=			line.strip()
            lowercase														=			parse_roman_numerals(lowerCAmelCase__	)
            lowercase														=			generate_roman_numerals(lowerCAmelCase__	)
            savings += len(lowerCAmelCase__	) - len(lowerCAmelCase__	)

      return savings


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




"""simple docstring"""






# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


__lowerCAmelCase					: Union[str, Any]        =subprocess.check_output("""git merge-base main HEAD""".split()).decode("""utf-8""")
__lowerCAmelCase					: List[str]        =subprocess.check_output(F"""git diff --name-only {fork_point_sha}""".split()).decode("""utf-8""").split()

__lowerCAmelCase					: List[str]        ="""|""".join(sys.argv[1:])
__lowerCAmelCase					: Dict        =re.compile(RF"""^({joined_dirs}).*?\.py$""")

__lowerCAmelCase					: int        =[x for x in modified_files if regex.match(x)]
print(""" """.join(relevant_modified_files), end="""""")



