


class       lowerCamelCase__   :





     def __init__(self       )     ->   Tuple:
      _lowercase							      =''''''
      _lowercase							      =''''''
      _lowercase							      =[]





     def      __A					(self		,     UpperCAmelCase		,     UpperCAmelCase       )     ->   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]:
        _lowercase							      =self.__min_dist_top_down_dp(m - 1		,     n - 1       )
       else:
        _lowercase							      =self.__min_dist_top_down_dp(UpperCAmelCase		,     n - 1       )
        _lowercase							      =self.__min_dist_top_down_dp(m - 1		,     UpperCAmelCase       )
        _lowercase							      =self.__min_dist_top_down_dp(m - 1		,     n - 1       )
        _lowercase							      =1 + min(UpperCAmelCase		,     UpperCAmelCase		,     UpperCAmelCase       )

       return self.dp[m][n]





     def      __A					(self		,     UpperCAmelCase		,     UpperCAmelCase       )     ->   int:
      _lowercase							      =worda
      _lowercase							      =worda
      _lowercase							      =[[-1 for _ in range(len(UpperCAmelCase       )       )] for _ in range(len(UpperCAmelCase       )       )]

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





     def      __A					(self		,     UpperCAmelCase		,     UpperCAmelCase       )     ->   int:
      _lowercase							      =worda
      _lowercase							      =worda
      _lowercase							      =len(UpperCAmelCase       )
      _lowercase							      =len(UpperCAmelCase       )
      _lowercase							      =[[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
         _lowercase							      =j
        elif j == 0:  # second string is empty
         _lowercase							      =i
        elif worda[i - 1] == worda[j - 1]:  # last characters are equal
         _lowercase							      =self.dp[i - 1][j - 1]
        else:
         _lowercase							      =self.dp[i][j - 1]
         _lowercase							      =self.dp[i - 1][j]
         _lowercase							      =self.dp[i - 1][j - 1]
         _lowercase							      =1 + min(UpperCAmelCase		,     UpperCAmelCase		,     UpperCAmelCase       )
      return self.dp[m][n]


if __name__ == "__main__":
  UpperCAmelCase__   	=							EditDistance()

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

  UpperCAmelCase__   	=							input('''Enter the first string: ''').strip()
  UpperCAmelCase__   	=							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 math import isqrt
def 				UpperCAmelCase_					(							__snake_case						)     ->			list[int]:







 """simple docstring"""


 _lowercase							      =[True] * max_number
 for i in range(2     ,						isqrt(max_number - 1						) + 1						):
  if is_prime[i]:
   for j in range(i**2     ,						__snake_case     ,						__snake_case						):
    _lowercase							      =False

 return [i for i in range(2     ,						__snake_case						) if is_prime[i]]
def 				UpperCAmelCase_					(							__snake_case = 10**8						)     ->			int:







 """simple docstring"""


 _lowercase							      =calculate_prime_numbers(max_number // 2						)

 _lowercase							      =0
 _lowercase							      =0
 _lowercase							      =len(__snake_case						) - 1
 while left <= right:
  while prime_numbers[left] * prime_numbers[right] >= max_number:
   right -= 1
  semiprimes_count += right - left + 1
  left += 1

 return semiprimes_count


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

