
__a         =   [
    (1_0_0_0, 'M'),
    (9_0_0, 'CM'),
    (5_0_0, 'D'),
    (4_0_0, 'CD'),
    (1_0_0, 'C'),
    (9_0, 'XC'),
    (5_0, 'L'),
    (4_0, 'XL'),
    (1_0, 'X'),
    (9, 'IX'),
    (5, 'V'),
    (4, 'IV'),
    (1, 'I'),
]




def 							a		(				snake_case__:   str   ):


				'''simple docstring'''
				lowercase_	    =   {'''I''': 1, '''V''': 5, '''X''': 10, '''L''': 50, '''C''': 100, '''D''': 500, '''M''': 1_000}
				lowercase_	    =   0
				lowercase_	    =   0
				while place < len(snake_case__   ):
								if (place + 1 < len(snake_case__   )) 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 							a		(				snake_case__:   int   ):


				'''simple docstring'''
				lowercase_	    =   []
				for arabic, roman in ROMAN:
								((lowercase_)    ,      (lowercase_))	    =   divmod(snake_case__		,  snake_case__   )
								result.append(roman * factor   )
								if number == 0:
												break
				return "".join(snake_case__   )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





"""simple docstring"""



def 	_lowerCamelCase(	a   ,    a				):
       __a       =    0
       __a       =    len(a				) - 1

       while left <= right:
              # avoid divided by 0 during interpolation
              if sorted_collection[left] == sorted_collection[right]:
                     if sorted_collection[left] == item:
                            return left
                     else:
                            return None

              __a       =    left + ((item - sorted_collection[left]) * (right - left)) // (
                  sorted_collection[right] - sorted_collection[left]
              )

              # out of range check
              if point < 0 or point >= len(a				):
                     return None

              __a       =    sorted_collection[point]
              if current_item == item:
                     return point
              else:
                     if point < left:
                            __a       =    left
                            __a       =    point
                     elif point > right:
                            __a       =    right
                            __a       =    point
                     else:
                            if item < current_item:
                                   __a       =    point - 1
                            else:
                                   __a       =    point + 1
       return None



def 	_lowerCamelCase(	a   ,    a   ,    a   ,    a				):

       # avoid divided by 0 during interpolation
       if sorted_collection[left] == sorted_collection[right]:
              if sorted_collection[left] == item:
                     return left
              else:
                     return None

       __a       =    left + ((item - sorted_collection[left]) * (right - left)) // (
           sorted_collection[right] - sorted_collection[left]
       )

       # out of range check
       if point < 0 or point >= len(a				):
              return None

       if sorted_collection[point] == item:
              return point
       elif point < left:
              return interpolation_search_by_recursion(a   ,    a   ,    a   ,    a				)
       elif point > right:
              return interpolation_search_by_recursion(a   ,    a   ,    a   ,    a				)
       else:
              if sorted_collection[point] > item:
                     return interpolation_search_by_recursion(
                         a   ,    a   ,    a   ,    point - 1				)
              else:
                     return interpolation_search_by_recursion(
                         a   ,    a   ,    point + 1   ,    a				)



def 	_lowerCamelCase(	a				):
       if collection != sorted(a				):
              raise ValueError("Collection must be ascending sorted"				)
       return True


if __name__ == "__main__":
   import sys
   SCREAMING_SNAKE_CASE__:List[str]									=			0
   if debug == 1:
      SCREAMING_SNAKE_CASE__:Tuple									=			[10, 30, 40, 45, 50, 66, 77, 93]
      try:
         __assert_sorted(collection)
      except ValueError:
         sys.exit("""Sequence must be ascending sorted to apply interpolation search""")
      SCREAMING_SNAKE_CASE__:int									=			67

   SCREAMING_SNAKE_CASE__:List[str]									=			interpolation_search(collection, target)
   if result is not None:
      print(F'''{target} found at positions: {result}''')
   else:
      print("""Not found""")
