

import os

__snake_case				:      Tuple   		=			{"""I""": 1, """V""": 5, """X""": 10, """L""": 50, """C""": 1_00, """D""": 5_00, """M""": 10_00}


def 					_UpperCAmelCase				(						a__):

			'''simple docstring'''



			a_						:						Optional[Any] 							= 0

			a_						:						List[Any] 							= 0
			while index < len(a__) - 1:
						a_						:						List[str] 							= SYMBOLS[numerals[index]]
						a_						:						Union[str, Any] 							= 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				(						a__):

			'''simple docstring'''



			a_						:						Optional[int] 							= """"""

			a_						:						List[str] 							= num // 1_0_0_0
			numerals += m_count * "M"
			num %= 1_0_0_0

			a_						:						Optional[int] 							= 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

			a_						:						List[str] 							= 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				(						a__ = "/p089_roman.txt"):

			'''simple docstring'''



			a_						:						str 							= 0

			with open(os.path.dirname(a__) + roman_numerals_filename) as filea:
						a_						:						Optional[int] 							= filea.readlines()

			for line in lines:
						a_						:						Optional[int] 							= line.strip()
						a_						:						List[str] 							= parse_roman_numerals(a__)
						a_						:						List[str] 							= generate_roman_numerals(a__)
						savings += len(a__) - len(a__)

			return savings


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





from __future__ import annotations


def 					_UpperCAmelCase				(						a__  ,	a__):

			'''simple docstring'''



			a_						:						List[str] 							= 0
			a_						:						str 							= len(a__) - 1

			while i < j:
						if nums[i] + nums[j] == target:
									return [i, j]
						elif nums[i] + nums[j] < target:
									a_						:						List[Any] 							= i + 1
						else:
									a_						:						Optional[Any] 							= j - 1

			return []


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(F"""{two_pointer([2, 7, 11, 15], 9) = }""")


