'''simple docstring'''

def __UpperCamelCase(   _A					:				int  ,			_A					:				list[int]  ,			_A					:				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    ):
   '''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]
      UpperCAmelCase__							:				List[Any]   				=  sum(
          count_of_possible_combinations_with_dp_array(target - item  ,			_A    )
          for item in array    )
      UpperCAmelCase__							:				str   				=  answer
      return answer

   UpperCAmelCase__							:				Optional[Any]   				=  [-1] * (target + 1)
   return count_of_possible_combinations_with_dp_array(_A  ,			_A    )







def __UpperCamelCase(   _A					:				int  ,			_A					:				list[int]  ,			_A					:				int    ):
   '''simple docstring'''
   UpperCAmelCase__							:				Any   				=  [0] * (target + 1)
   UpperCAmelCase__							:				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()
  UpperCamelCase__     :	Optional[Any]				=			3
  UpperCamelCase__     :	Optional[int]				=			5
  UpperCamelCase__     :	Tuple				=			[1, 2, 5]
  print(combination_sum_iv(n, array, target))





'''simple docstring'''

import re







def __UpperCamelCase(   _A					:				str    ):
   '''simple docstring'''

   if len(re.findall('''[ATCG]'''  ,			_A    )    ) != len(_A    ):
      raise ValueError('''Invalid Strand'''    )

   return dna.translate(dna.maketrans('''ATCG'''  ,			'''TAGC'''    )    )


if __name__ == "__main__":
  import doctest

  doctest.testmod()




