'''simple docstring'''

def snake_case_      (					__snake_case  :							int	,   __snake_case  :							list[int]	,   __snake_case  :							int)			->					int:

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



def snake_case_      (					__snake_case  :							int	,   __snake_case  :							list[int]	,   __snake_case  :							int)			->					int:

   def count_of_possible_combinations_with_dp_array(
       __snake_case  :							int	,   __snake_case  :							list[int]) -> int:
      if target < 0:
         return 0
      if target == 0:
         return 1
      if dp_array[target] != -1:
         return dp_array[target]
      lowerCAmelCase_			=      sum(
          count_of_possible_combinations_with_dp_array(target - item	,   __snake_case)
          for item in array)
      lowerCAmelCase_			=      answer
      return answer

   lowerCAmelCase_			=      [-1] * (target + 1)
   return count_of_possible_combinations_with_dp_array(__snake_case	,   __snake_case)



def snake_case_      (					__snake_case  :							int	,   __snake_case  :							list[int]	,   __snake_case  :							int)			->					int:
   lowerCAmelCase_			=      [0] * (target + 1)
   lowerCAmelCase_			=      1

   for i in range(1	,   target + 1):
      for j in range(__snake_case):
         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_     :						Union[str, Any]    							=3
 A_     :						Union[str, Any]    							=5
 A_     :						List[Any]    							=[1, 2, 5]
 print(combination_sum_iv(n, array, target))






'''simple docstring'''

def snake_case_      (					__snake_case  :							int	,   __snake_case  :							int	,   __snake_case  :							int)			->					float:
   lowerCAmelCase_			=      (num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
   # formula for sum of series
   return total



def snake_case_      (					)			->					str:
   print(sum_of_series(1	,   1	,   10))


if __name__ == "__main__":
 import doctest

 doctest.testmod()





