from math import pi, sqrt




def 				UpperCamelCase						(       __lowercase						: Any	):
		'''simple docstring'''




		if num <= 0:
				raise ValueError('math domain error'	)
		if num > 1_71.5:
				raise OverflowError('math range error'	)
		elif num - int(lowercase__	) not in (0, 0.5):
				raise NotImplementedError('num must be an integer or a half-integer'	)
		elif num == 0.5:
				return sqrt(lowercase__	)
		else:
				return 1.0 if num == 1 else (num - 1) * gamma(num - 1	)




def 				UpperCamelCase						(       ):
		'''simple docstring'''




		assert gamma(0.5	) == sqrt(lowercase__	)
		assert gamma(1	) == 1.0
		assert gamma(2	) == 1.0


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	_UpperCAmelCase						=		1.0
	while num:
		_UpperCAmelCase						=		float(input("""Gamma of: """))
		print(F"""gamma({num}) = {gamma(num)}""")
		print("""\nEnter 0 to exit...""")










def        _lowerCamelCase(	lowercase__	)						->	int:

		'''simple docstring'''







		if collection == []:
				return []

		# get some information about the collection
		__lowercase=			len(lowercase__	)
		__lowercase=			max(lowercase__	)
		__lowercase=			min(lowercase__	)

		# create the counting array
		__lowercase=			coll_max + 1 - coll_min
		__lowercase=			[0] * counting_arr_length

		# count how much a number appears in the collection
		for number in collection:
				counting_arr[number - coll_min] += 1

		# sum each position with it's predecessors. now, counting_arr[i] tells
		# us how many elements <= i has in the collection
		for i in range(1   , lowercase__	):
				__lowercase=			counting_arr[i] + counting_arr[i - 1]

		# create the output collection
		__lowercase=			[0] * coll_len

		# place the elements in the output, respecting the original order (stable
		# sort) from end to begin, updating counting_arr
		for i in reversed(range(0   , lowercase__	)	):
				__lowercase=			collection[i]
				counting_arr[collection[i] - coll_min] -= 1

		return ordered







def        _lowerCamelCase(	lowercase__	)						->	List[str]:

		'''simple docstring'''







		return "".join([chr(lowercase__	) for i in counting_sort([ord(lowercase__	) for c in string]	)]	)


if __name__ == "__main__":
	# Test string sort
	assert counting_sort_string('''thisisthestring''') == "eghhiiinrsssttt"

	lowerCAmelCase           =		input('''Enter numbers separated by a comma:\n''').strip()
	lowerCAmelCase           =		[int(item) for item in user_input.split(''',''')]
	print(counting_sort(unsorted))






