'''simple docstring'''




def 				snake_case__							(			_A:					int )    ->	int:

		'''simple docstring'''


		if not isinstance(_A      ,   _A ):
				raise ValueError("""Input must be an integer""" )
		if input_num <= 0:
				raise ValueError("""Input must be positive""" )
		return sum(
		    divisor for divisor in range(1      ,   input_num // 2 + 1 ) if input_num % divisor == 0 )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





'''simple docstring'''




def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		while a != 0:
				lowerCAmelCase					,     lowerCAmelCase   					=  b % a, a
		return b






def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		if gcd(_A      ,   _A ) != 1:
				lowerCAmelCase   					=  f"mod inverse of {a!r} and {m!r} does not exist"
				raise ValueError(_A )
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  1, 0, a
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  0, 1, m
		while va != 0:
				lowerCAmelCase   					=  ua // va
				lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
		return ua % m




