
'''simple docstring'''
def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):
       _snake_case       =  0
       _snake_case       =  len(_SCREAMING_SNAKE_CASE				) - 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

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

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

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






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):

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

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

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

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






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


if __name__ == "__main__":
    import sys
    __lowerCAmelCase												=	0
    if debug == 1:
        __lowerCAmelCase												=	[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')
        __lowerCAmelCase												=	67

    __lowerCAmelCase												=	interpolation_search(collection, target)
    if result is not None:
        print(f'''{target} found at positions: {result}''')
    else:
        print('Not found')

'''simple docstring'''
from __future__ import annotations

import typing
from collections import Counter






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE				):
							_snake_case       =  Counter()
							for base in range(1							, max_perimeter + 1				):
														for perpendicular in range(_SCREAMING_SNAKE_CASE							, max_perimeter + 1				):
																					_snake_case       =  (base * base + perpendicular * perpendicular) ** 0.5
																					if hypotenuse == int(_SCREAMING_SNAKE_CASE				):
																												_snake_case       =  int(base + perpendicular + hypotenuse				)
																												if perimeter > max_perimeter:
																																			continue
																												triplets[perimeter] += 1
							return triplets






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE = 1000				):
							_snake_case       =  pythagorean_triple(_SCREAMING_SNAKE_CASE				)
							return triplets.most_common(1				)[0][0]


if __name__ == "__main__":
				print(f'''Perimeter {solution()} has maximum solutions''')