


'''simple docstring'''







from __future__ import annotations







def _UpperCamelCase	(					__A				,      __A				,      __A   )							->		int | float:


      '''simple docstring'''



      if len(__A   ) == 0:
            raise ValueError("find_min() arg is an empty sequence"   )
      if (
          left >= len(__A   )
          or left < -len(__A   )
          or right >= len(__A   )
          or right < -len(__A   )
      ):
            raise IndexError("list index out of range"   )
      if left == right:
            return nums[left]
      UpperCamelCase__  =    (left + right) >> 1  # the middle
      UpperCamelCase__  =    find_min(__A				,      __A				,      __A   )  # find min in range[left, mid]
      UpperCamelCase__  =    find_min(__A				,      mid + 1				,      __A   )  # find min in range[mid + 1, right]

      return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)







'''simple docstring'''







def _UpperCamelCase	(					__A   )							->		int:


      '''simple docstring'''



      if number != int(__A   ):
            raise ValueError("factorial() only accepts integral values"   )
      if number < 0:
            raise ValueError("factorial() not defined for negative values"   )
      UpperCamelCase__  =    1
      for i in range(1				,      number + 1   ):
            value *= i
      return value







def _UpperCamelCase	(					__A   )							->		int:


      '''simple docstring'''



      if not isinstance(__A				,      __A   ):
            raise ValueError("factorial() only accepts integral values"   )
      if n < 0:
            raise ValueError("factorial() not defined for negative values"   )
      return 1 if n == 0 or n == 1 else n * factorial(n - 1   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a__  : str				=	int(input('Enter a positive integer: ').strip() or 0)
  print(F"""factorial{n} is {factorial(n)}""")





