



'''simple docstring'''

def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   int:
		_a  :   Any				 =							len(lowerCAmelCase_						)
		if n in (0, 1):
				return 0
		return sum(query * (n - i - 1) for i, query in enumerate(sorted(lowerCAmelCase_						)						)						)


if __name__ == "__main__":
							import doctest

							doctest.testmod()









'''simple docstring'''

import math



def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   list:
		if n <= 0:
				raise ValueError('Only positive integers have prime factors'						)
		_a  :   Tuple				 =							[]
		while n % 2 == 0:
				pf.append(2						)
				_a  :   str				 =							int(n / 2						)
		for i in range(3		,    int(math.sqrt(lowerCAmelCase_						)						) + 1		,    2						):
				while n % i == 0:
						pf.append(lowerCAmelCase_						)
						_a  :   List[Any]				 =							int(n / i						)
		if n > 2:
				pf.append(lowerCAmelCase_						)
		return pf



def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   int:
		if n <= 0:
				raise ValueError('Only positive numbers are accepted'						)
		_a  :   int				 =							1
		_a  :   Union[str, Any]				 =							1
		while n % 2 == 0:
				temp += 1
				_a  :   str				 =							int(n / 2						)
		div *= temp
		for i in range(3		,    int(math.sqrt(lowerCAmelCase_						)						) + 1		,    2						):
				_a  :   List[str]				 =							1
				while n % i == 0:
						temp += 1
						_a  :   List[str]				 =							int(n / i						)
				div *= temp
		if n > 1:
				div *= 2
		return div



def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   int:
		if n <= 0:
				raise ValueError('Only positive numbers are accepted'						)
		_a  :   List[str]				 =							1
		_a  :   Union[str, Any]				 =							1
		while n % 2 == 0:
				temp += 1
				_a  :   Tuple				 =							int(n / 2						)
		if temp > 1:
				s *= (2**temp - 1) / (2 - 1)
		for i in range(3		,    int(math.sqrt(lowerCAmelCase_						)						) + 1		,    2						):
				_a  :   str				 =							1
				while n % i == 0:
						temp += 1
						_a  :   Any				 =							int(n / i						)
				if temp > 1:
						s *= (i**temp - 1) / (i - 1)
		return int(lowerCAmelCase_						)



def   __lowerCamelCase  (   lowerCAmelCase_						)    ->   int:
		_a  :   Dict				 =							n
		for x in set(prime_factors(lowerCAmelCase_						)						):
				s *= (x - 1) / x
		return int(lowerCAmelCase_						)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




