


'''simple docstring'''


from __future__ import annotations


def 		_lowercase (SCREAMING_SNAKE_CASE       ,					SCREAMING_SNAKE_CASE							):




     '''simple docstring'''





     if nth_term == "":
          return [""]
     __A	:       int      =							int(SCREAMING_SNAKE_CASE							)
     __A	:       List[str]      =							int(SCREAMING_SNAKE_CASE							)
     __A	:       list[str]      =							[]
     for temp in range(int(SCREAMING_SNAKE_CASE							)							):
          series.append(f"1 / {pow(temp + 1       ,					int(SCREAMING_SNAKE_CASE							)							)}" if series else "1"							)
     return series


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      _UpperCamelCase 							=  int(input("""Enter the last number (nth term) of the P-Series"""))
      _UpperCamelCase 							=  int(input("""Enter the power for  P-Series"""))
      print("""Formula of P-Series => 1+1/2^p+1/3^p ..... 1/n^p""")
      print(p_series(nth_term, power))





'''simple docstring'''


import functools


def 		_lowercase (SCREAMING_SNAKE_CASE       ,					SCREAMING_SNAKE_CASE							):




     '''simple docstring'''





     __A	:       int      =							len(SCREAMING_SNAKE_CASE							)
     __A	:       int      =							len(SCREAMING_SNAKE_CASE							)

     @functools.cache
     def min_distance(SCREAMING_SNAKE_CASE       ,					SCREAMING_SNAKE_CASE							) -> int:
          # if first word index is overflow - delete all from the second word
          if indexa >= len_worda:
               return len_worda - indexa
          # if second word index is overflow - delete all from the first word
          if indexa >= len_worda:
               return len_worda - indexa
          __A	:       Optional[int]      =							int(worda[indexa] != worda[indexa]							)  # current letters not identical
          return min(
              1 + min_distance(indexa + 1       ,					SCREAMING_SNAKE_CASE							)       ,					1 + min_distance(SCREAMING_SNAKE_CASE       ,					indexa + 1							)       ,					diff + min_distance(indexa + 1       ,					indexa + 1							)       ,					)

     return min_distance(0       ,					0							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

