
'''simple docstring'''







from math import pow







def 				SCREAMING_SNAKE_CASE__	(   __A			,				__A			,				__A			,				__A			,				__A			,				)       ->	tuple[int, int]:
	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

	_snake_case   						=		int(pow(__A			,				__A	)	)
	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
		_snake_case						, _snake_case   						=		backtrack(
		    __A			,				__A			,				current_number + 1			,				__A			,				__A	)
		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.
		_snake_case						, _snake_case   						=		backtrack(
		    __A			,				__A			,				current_number + 1			,				__A			,				__A	)
	return current_sum, solutions_count







def 				SCREAMING_SNAKE_CASE__	(   __A			,				__A	)       ->	int:
	if not (1 <= needed_sum <= 1_000 and 2 <= power <= 10):
		raise ValueError(
		    'Invalid input\n'
		    'needed_sum must be between 1 and 1000, power between 2 and 10.'	)

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()



'''simple docstring'''







def 				SCREAMING_SNAKE_CASE__	(   __A	)       ->	str:
	_snake_case   						=		1
	_snake_case   						=		2
	while i * i <= n:
		_snake_case   						=		0
		while n % i == 0:
			n //= i
			multiplicity += 1
		n_divisors *= multiplicity + 1
		i += 1
	if n > 1:
		n_divisors *= 2
	return n_divisors







def 				SCREAMING_SNAKE_CASE__	(   )       ->	List[str]:
	_snake_case   						=		1
	_snake_case   						=		1

	while True:
		i += 1
		t_num += i

		if count_divisors(__A	) > 500:
			break

	return t_num


if __name__ == "__main__":
					print(solution())

