






def 						a_      (__A			)							->	int:



					"""simple docstring"""
					__a				:	Any			=				len(__A			)
					if n in (0, 1):
										return 0
					return sum(query * (n - i - 1) for i, query in enumerate(sorted(__A			)			)			)


if __name__ == "__main__":
			import doctest

			doctest.testmod()










def 						a_      (__A			)							->	list:



					"""simple docstring"""
					if len(__A			) <= 1:
										return data
					else:
										return [
										    *quick_sort([e for e in data[1:] if e <= data[0]]			),
										    data[0],
										    *quick_sort([e for e in data[1:] if e > data[0]]			),
										]


if __name__ == "__main__":
			import doctest

			doctest.testmod()





