





'''simple docstring'''


import math


def 						__a(SCREAMING_SNAKE_CASE_	:       int     ):



    '''simple docstring'''





    return math.sqrt(SCREAMING_SNAKE_CASE_     ) * math.sqrt(SCREAMING_SNAKE_CASE_     ) == num


def 						__a(SCREAMING_SNAKE_CASE_	:       int     ):



    '''simple docstring'''





    _lowerCAmelCase						      =   0
    _lowerCAmelCase						      =   n
    while left <= right:
        _lowerCAmelCase						      =   (left + right) // 2
        if mid**2 == n:
            return True
        elif mid**2 > n:
            _lowerCAmelCase						      =   mid - 1
        else:
            _lowerCAmelCase						      =   mid + 1
    return False


if __name__ == "__main__":
       import doctest

       doctest.testmod()









'''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))


