






'''simple docstring'''







import os

UpperCamelCase     :   int	      =		{'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 1_00, 'D': 5_00, 'M': 10_00}
def     A__      (					__lowerCAmelCase		:      str    ):
						lowerCamelCase__								=	0

						lowerCamelCase__								=	0
						while index < len(__lowerCAmelCase    ) - 1:
												lowerCamelCase__								=	SYMBOLS[numerals[index]]
												lowerCamelCase__								=	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     A__      (					__lowerCAmelCase		:      int    ):
						lowerCamelCase__								=	""""""

						lowerCamelCase__								=	num // 1000
						numerals += m_count * "M"
						num %= 1000

						lowerCamelCase__								=	num // 100
						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 %= 100

						lowerCamelCase__								=	num // 10
						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 %= 10

						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     A__      (					__lowerCAmelCase		:      str = "/p089_roman.txt"    ):
						lowerCamelCase__								=	0

						with open(os.path.dirname(__lowerCAmelCase    ) + roman_numerals_filename    ) as filea:
												lowerCamelCase__								=	filea.readlines()

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

						return savings


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


'''simple docstring'''

from math import factorial, radians







def __UpperCamelCase( _A       :					float	,      _A       :					int = 18	,      _A       :					int = 10     ):
   '''simple docstring'''
   UpperCAmelCase__				:					int 					=	angle_in_degrees - ((angle_in_degrees // 3_6_0.0) * 3_6_0.0)

   # Converting from degrees to radians
   UpperCAmelCase__				:					Dict 					=	radians(_A     )

   UpperCAmelCase__				:					Union[str, Any] 					=	angle_in_radians
   UpperCAmelCase__				:					List[str] 					=	3
   UpperCAmelCase__				:					int 					=	-1

   for _ in range(_A     ):
      result += (b * (angle_in_radians**a)) / factorial(_A     )

      UpperCAmelCase__				:					List[str] 					=	-b  # One positive term and the next will be negative and so on...
      a += 2  # Increased by 2 for every term.

   return round(_A	,      _A     )


if __name__ == "__main__":
  __import__('doctest').testmod()




