





class     __snake_case       :





       '''simple docstring'''







       def __init__(  self :    str		):
         __snake_case:						int   =						""""""
         __snake_case:						int   =						""""""
         __snake_case:						List[Any]   =						[]




       def 							UpperCAmelCase__ (  self :    Union[str, Any]							,				A :    int							,				A :    int		):
         if m == -1:
           return n + 1
         elif n == -1:
           return m + 1
         elif self.dp[m][n] > -1:
           return self.dp[m][n]
         else:
           if self.worda[m] == self.worda[n]:
             __snake_case:						Tuple   =						self.__min_dist_top_down_dp(m - 1							,				n - 1		)
           else:
             __snake_case:						str   =						self.__min_dist_top_down_dp(A							,				n - 1		)
             __snake_case:						List[str]   =						self.__min_dist_top_down_dp(m - 1							,				A		)
             __snake_case:						Tuple   =						self.__min_dist_top_down_dp(m - 1							,				n - 1		)
             __snake_case:						int   =						1 + min(A							,				A							,				A		)

           return self.dp[m][n]




       def 							UpperCAmelCase__ (  self :    int							,				A :    str							,				A :    str		):
         __snake_case:						List[str]   =						worda
         __snake_case:						int   =						worda
         __snake_case:						Optional[int]   =						[[-1 for _ in range(len(A		)		)] for _ in range(len(A		)		)]

         return self.__min_dist_top_down_dp(len(A		) - 1							,				len(A		) - 1		)






       def 							UpperCAmelCase__ (  self :    Dict							,				A :    str							,				A :    str		):
         __snake_case:						List[Any]   =						worda
         __snake_case:						Dict   =						worda
         __snake_case:						Dict   =						len(A		)
         __snake_case:						Any   =						len(A		)
         __snake_case:						Any   =						[[0 for _ in range(n + 1		)] for _ in range(m + 1		)]

         for i in range(m + 1		):
           for j in range(n + 1		):
             if i == 0:  # first string is empty
               __snake_case:						Any   =						j
             elif j == 0:  # second string is empty
               __snake_case:						Optional[int]   =						i
             elif worda[i - 1] == worda[j - 1]:  # last characters are equal
               __snake_case:						int   =						self.dp[i - 1][j - 1]
             else:
               __snake_case:						Any   =						self.dp[i][j - 1]
               __snake_case:						Dict   =						self.dp[i - 1][j]
               __snake_case:						List[Any]   =						self.dp[i - 1][j - 1]
               __snake_case:						Tuple   =						1 + min(A							,				A							,				A		)
         return self.dp[m][n]


if __name__ == "__main__":
      __UpperCAmelCase       :   List[str]				       =							EditDistance()

      print("****************** Testing Edit Distance DP Algorithm ******************")
      print()

      __UpperCAmelCase       :   Dict				       =							input("Enter the first string: ").strip()
      __UpperCAmelCase       :   List[str]				       =							input("Enter the second string: ").strip()

      print()
      print(f'The minimum edit distance is: {solver.min_dist_top_down(Sa, Sa)}')
      print(f'The minimum edit distance is: {solver.min_dist_bottom_up(Sa, Sa)}')
      print()
      print("*************** End of Testing Edit Distance DP Algorithm ***************")













from __future__ import annotations

import typing
from collections import Counter







def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    typing.Counter[int]:
  __snake_case:						typing.Counter[int]   =						Counter()
  for base in range(1					,					max_perimeter + 1):
    for perpendicular in range(SCREAMING_SNAKE_CASE__					,					max_perimeter + 1):
      __snake_case:						Dict   =						(base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(SCREAMING_SNAKE_CASE__):
        __snake_case:						Any   =						int(base + perpendicular + hypotenuse)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets







def 			A__							(    SCREAMING_SNAKE_CASE__ = 1000)   ->    int:
  __snake_case:						List[str]   =						pythagorean_triple(SCREAMING_SNAKE_CASE__)
  return triplets.most_common(1)[0][0]


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






