

from __future__ import annotations



def    __UpperCAmelCase (	__a      :			int | float | str		,__a      :			int | float | str	)			->     list[str]:

					"""simple docstring"""

					if nth_term == "":
										return [""]
					_a	:    List[Any]         =		int(__a	)
					_a	:    Tuple         =		int(__a	)
					_a	:    list[str]         =		[]
					for temp in range(int(__a	)	):
										series.append(F"""1 / {pow(temp + 1		,int(__a	)	)}""" if series else '''1'''	)
					return series


if __name__ == "__main__":
			import doctest

			doctest.testmod()

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






def    __UpperCAmelCase (	__a      :			int		,__a      :			list[int]		,__a      :			int	)			->     int:

					"""simple docstring"""

					def count_of_possible_combinations(__a      :			int	) -> int:
										if target < 0:
															return 0
										if target == 0:
															return 1
										return sum(count_of_possible_combinations(target - item	) for item in array	)

					return count_of_possible_combinations(__a	)



def    __UpperCAmelCase (	__a      :			int		,__a      :			list[int]		,__a      :			int	)			->     int:

					"""simple docstring"""

					def count_of_possible_combinations_with_dp_array(
					    __a      :			int		,__a      :			list[int]	) -> int:
										if target < 0:
															return 0
										if target == 0:
															return 1
										if dp_array[target] != -1:
															return dp_array[target]
										_a	:    Union[str, Any]         =		sum(
										    count_of_possible_combinations_with_dp_array(target - item		,__a	)
										    for item in array	)
										_a	:    Optional[int]         =		answer
										return answer

					_a	:    int         =		[-1] * (target + 1)
					return count_of_possible_combinations_with_dp_array(__a		,__a	)



def    __UpperCAmelCase (	__a      :			int		,__a      :			list[int]		,__a      :			int	)			->     int:

					"""simple docstring"""

					_a	:    str         =		[0] * (target + 1)
					_a	:    Optional[Any]         =		1

					for i in range(1		,target + 1	):
										for j in range(__a	):
															if i - array[j] >= 0:
																				dp_array[i] += dp_array[i - array[j]]

					return dp_array[target]


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			a__				=		3
			a__				=		5
			a__				=		[1, 2, 5]
			print(combination_sum_iv(n, array, target))



