


'''simple docstring'''






import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
		import ctypes
		import msvcrt  # noqa






		class        __snake_case	(       ctypes.Structure):







						"""simple docstring"""



						lowercase       			= [('size', ctypes.c_int), ('visible', ctypes.c_byte)]







def     UpperCamelCase_      (   ):
		'''simple docstring'''





		if os.name == "nt":
				lowerCAmelCase_      :				List[Any]      =       CursorInfo()
				lowerCAmelCase_      :				int      =       ctypes.windll.kernelaa.GetStdHandle(-11 )
				ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCAmelCase__							,   ctypes.byref(UpperCAmelCase__ ) )
				lowerCAmelCase_      :				List[str]      =       False
				ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCAmelCase__							,   ctypes.byref(UpperCAmelCase__ ) )
		elif os.name == "posix":
				sys.stdout.write("""\033[?25l""" )
				sys.stdout.flush()







def     UpperCamelCase_      (   ):
		'''simple docstring'''





		if os.name == "nt":
				lowerCAmelCase_      :				int      =       CursorInfo()
				lowerCAmelCase_      :				Optional[Any]      =       ctypes.windll.kernelaa.GetStdHandle(-11 )
				ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCAmelCase__							,   ctypes.byref(UpperCAmelCase__ ) )
				lowerCAmelCase_      :				Optional[int]      =       True
				ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCAmelCase__							,   ctypes.byref(UpperCAmelCase__ ) )
		elif os.name == "posix":
				sys.stdout.write("""\033[?25h""" )
				sys.stdout.flush()







@contextmanager
def     UpperCamelCase_      (   ):
		'''simple docstring'''





		try:
				hide_cursor()
				yield
		finally:
				show_cursor()







'''simple docstring'''






from __future__ import annotations







def     UpperCamelCase_      (   A__ :       int | float | str							,   A__ :       int | float | str ):
  '''simple docstring'''





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


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  __A :  str    							=				int(input("Enter the last number (nth term) of the P-Series"))
  __A :  Tuple    							=				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))



