





from math import pow





def  __magic_name__  (				lowercase				,       lowercase				,       lowercase				,       lowercase				,       lowercase				,       )				-> tuple[int, int]:

							"""simple docstring"""



							if current_sum == needed_sum:
														# If the sum of the powers is equal to needed_sum, then we have a solution.
														solutions_count += 1
														return current_sum, solutions_count

							lowercase_	:   Optional[int]  				=     int(pow(lowercase				,       lowercase				)				)
							if current_sum + i_to_n <= needed_sum:
														# If the sum of the powers is less than needed_sum, then continue adding powers.
														current_sum += i_to_n
														lowercase_				,		lowercase_	:   Union[str, Any]  				=     backtrack(
														    lowercase				,       lowercase				,       current_number + 1				,       lowercase				,       lowercase				)
														current_sum -= i_to_n
							if i_to_n < needed_sum:
														# If the power of i is less than needed_sum, then try with the next power.
														lowercase_				,		lowercase_	:   Optional[Any]  				=     backtrack(
														    lowercase				,       lowercase				,       current_number + 1				,       lowercase				,       lowercase				)
							return current_sum, solutions_count





def  __magic_name__  (				lowercase				,       lowercase				)				-> int:

							"""simple docstring"""



							if not (1 <= needed_sum <= 1000 and 2 <= power <= 10):
														raise ValueError(
														    """Invalid input\n"""
														    """needed_sum must be between 1 and 1000, power between 2 and 10."""				)

							return backtrack(lowercase				,       lowercase				,       1				,       0				,       0				)[1]  # Return the solutions_count


if __name__ == "__main__":
							import doctest

							doctest.testmod()






from __future__ import annotations

import numpy as np





def  __magic_name__  (				lowercase				)				-> Tuple:

							"""simple docstring"""



							return np.maximum(0				,       lowercase				)


if __name__ == "__main__":
							print(np.array(relu([-1, 0, 5])))  # --> [0, 0, 5]