



"""simple docstring"""






def 	snake_case_  (				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 	snake_case_  (				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]
              _lowerCamelCase						:    List[Any]         =			sum(
                  count_of_possible_combinations_with_dp_array(target - item,    A_						)
                  for item in array						)
              _lowerCamelCase						:    Optional[Any]         =			answer
              return answer

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






def 	snake_case_  (				A_ :		int,    A_ :		list[int],    A_ :		int						):


       '''simple docstring'''





       _lowerCamelCase						:    List[str]         =			[0] * (target + 1)
       _lowerCamelCase						:    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()
   lowerCAmelCase__      =    3
   lowerCAmelCase__      =    5
   lowerCAmelCase__      =    [1, 2, 5]
   print(combination_sum_iv(n, array, target))







"""simple docstring"""






def 	snake_case_  (				A_ :		int						):


       '''simple docstring'''





       return 1 if digit in (0, 1) else (digit * factorial(digit - 1						))






def 	snake_case_  (				A_ :		int						):


       '''simple docstring'''





       _lowerCamelCase						:    str         =			0
       _lowerCamelCase						:    Any         =			number
       while duplicate > 0:
              _lowerCamelCase      ,   _lowerCamelCase						:    Union[str, Any]         =			divmod(A_,    10						)
              fact_sum += factorial(A_						)
       return fact_sum == number


if __name__ == "__main__":
   print('''Program to check whether a number is a Krisnamurthy Number or not.''')
   lowerCAmelCase__      =    int(input('''Enter number: ''').strip())
   print(
       F"""{number} is {"" if krishnamurthy(number) else "not "}a Krishnamurthy Number."""
   )


