





'''simple docstring'''






from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
      import accelerate


def 					_a   (__SCREAMING_SNAKE_CASE   ):


  """simple docstring"""

  if not is_accelerate_available():
    return method
  _UpperCamelCase       			=version.parse(accelerate.__version__   ).base_version
  if version.parse(__SCREAMING_SNAKE_CASE   ) < version.parse('''0.17.0'''   ):
    return method

  def wrapper(self  ,      *__SCREAMING_SNAKE_CASE  ,      **__SCREAMING_SNAKE_CASE   ):
    if hasattr(self  ,      '''_hf_hook'''   ) and hasattr(self._hf_hook  ,      '''pre_forward'''   ):
      self._hf_hook.pre_forward(self   )
    return method(self  ,      *__SCREAMING_SNAKE_CASE  ,      **__SCREAMING_SNAKE_CASE   )

  return wrapper













'''simple docstring'''






def 					_a   (__SCREAMING_SNAKE_CASE   ):


  """simple docstring"""

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


def 					_a   (__SCREAMING_SNAKE_CASE   ):


  """simple docstring"""

  _UpperCamelCase       			=0
  _UpperCamelCase       			=number
  while duplicate > 0:
    _UpperCamelCase			,     _UpperCamelCase       			=divmod(__SCREAMING_SNAKE_CASE  ,      10   )
    fact_sum += factorial(__SCREAMING_SNAKE_CASE   )
  return fact_sum == number


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






