


def 						_lowerCamelCase		(							SCREAMING_SNAKE_CASE_				: int      ):






							"""simple docstring"""



							if number != int(SCREAMING_SNAKE_CASE_      ):
														raise ValueError("""factorial() only accepts integral values"""      )
							if number < 0:
														raise ValueError("""factorial() not defined for negative values"""      )
							a_       :   Optional[Any]			=	1
							for i in range(1	,	number + 1      ):
														value *= i
							return value





def 						_lowerCamelCase		(							SCREAMING_SNAKE_CASE_				: int      ):






							"""simple docstring"""



							if not isinstance(SCREAMING_SNAKE_CASE_	,	SCREAMING_SNAKE_CASE_      ):
														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()

	SCREAMING_SNAKE_CASE : Optional[Any]          =    int(input("Enter a positive integer: ").strip() or 0)
	print(F"""factorial{n} is {factorial(n)}""")






def 						_lowerCamelCase		(							SCREAMING_SNAKE_CASE_				: list[int]      ):






							"""simple docstring"""



							a_       :   List[Any]			=	len(SCREAMING_SNAKE_CASE_      )
							if n in (0, 1):
														return 0
							return sum(query * (n - i - 1) for i, query in enumerate(sorted(SCREAMING_SNAKE_CASE_      )      )      )


if __name__ == "__main__":
	import doctest

	doctest.testmod()


