





'''simple docstring'''


from __future__ import annotations


def 						__a(SCREAMING_SNAKE_CASE_	:       list[int | float]		,							SCREAMING_SNAKE_CASE_	:       int		,							SCREAMING_SNAKE_CASE_	:       int     ):



    '''simple docstring'''





    if len(SCREAMING_SNAKE_CASE_     ) == 0:
        raise ValueError("find_max() arg is an empty sequence"     )
    if (
        left >= len(SCREAMING_SNAKE_CASE_     )
        or left < -len(SCREAMING_SNAKE_CASE_     )
        or right >= len(SCREAMING_SNAKE_CASE_     )
        or right < -len(SCREAMING_SNAKE_CASE_     )
    ):
        raise IndexError("list index out of range"     )
    if left == right:
        return nums[left]
    _lowerCAmelCase						      =   (left + right) >> 1  # the middle
    _lowerCAmelCase						      =   find_max(SCREAMING_SNAKE_CASE_		,							SCREAMING_SNAKE_CASE_		,							SCREAMING_SNAKE_CASE_     )  # find max in range[left, mid]
    _lowerCAmelCase						      =   find_max(SCREAMING_SNAKE_CASE_		,							mid + 1		,							SCREAMING_SNAKE_CASE_     )  # find max in range[mid + 1, right]

    return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
       import doctest

       doctest.testmod(verbose=True)









'''simple docstring'''


from __future__ import annotations


def 						__a(SCREAMING_SNAKE_CASE_	:       int | float | str		,							SCREAMING_SNAKE_CASE_	:       int | float | str     ):



    '''simple docstring'''





    if nth_term == "":
        return [""]
    _lowerCAmelCase						      =   int(SCREAMING_SNAKE_CASE_     )
    _lowerCAmelCase						      =   int(SCREAMING_SNAKE_CASE_     )
    _lowerCAmelCase						      =   []
    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()

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


