Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Index Power solution in Clear category for Index Power by ahin9312
def index_power(array: list, n: int) -> int:
"""
Find Nth power of the element with index N.
"""
return array[n] ** n if n < len(array) else -1
March 23, 2020