





'''simple docstring'''






def       lowercase_      (		lowercase__				,  lowercase__				,  lowercase__						)   ->int:

						def count_of_possible_combinations(lowercase__						) -> 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(lowercase__						)





def       lowercase_      (		lowercase__				,  lowercase__				,  lowercase__						)   ->int:

						def count_of_possible_combinations_with_dp_array(
						    lowercase__				,  lowercase__						) -> int:
												if target < 0:
																		return 0
												if target == 0:
																		return 1
												if dp_array[target] != -1:
																		return dp_array[target]
												_snake_case:   List[Any]  					=		sum(
												    count_of_possible_combinations_with_dp_array(target - item				,  lowercase__						)
												    for item in array						)
												_snake_case:   List[Any]  					=		answer
												return answer

						_snake_case:   int  					=		[-1] * (target + 1)
						return count_of_possible_combinations_with_dp_array(lowercase__				,  lowercase__						)





def       lowercase_      (		lowercase__				,  lowercase__				,  lowercase__						)   ->int:
						_snake_case:   Optional[int]  					=		[0] * (target + 1)
						_snake_case:   List[str]  					=		1

						for i in range(1				,  target + 1						):
												for j in range(lowercase__						):
																		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   : Dict             =			3
		A   : Optional[int]             =			5
		A   : Optional[Any]             =			[1, 2, 5]
		print(combination_sum_iv(n, array, target))












'''simple docstring'''






import torch





def       lowercase_      (		)   ->Dict:
						if torch.cuda.is_available():
												_snake_case:   Any  					=		torch.cuda.device_count()
						else:
												_snake_case:   Optional[int]  					=		0
						print(F'''Successfully ran on {num_gpus} GPUs'''						)


if __name__ == "__main__":
		main()





