human
Write me a code to break a number such that sum of maximum divisors of all parts is minimum and the other steps required given the following:
Break a number such that sum of maximum divisors of all parts is minimum | Function to check if a number is prime or not ..
If n is an even number ( we can write it as sum of two primes ).
If n is odd and n - 2 is prime ..
If n is odd , n - 3 must be even ..
Driver code"
How can the above be solved in Python?
assistant
#Here is code to break a number such that sum of maximum divisors of all parts is minimum and the other steps required.
 def isPrime ( n ) :
	i = 2
	while ( i * i <= n ) :
		if ( n % i == 0 ) :
			return False
		i += 1
	return True
def minimumSum ( n ) :
	if ( isPrime ( n ) ) :
		return 1
	if ( n % 2 == 0 ) :
		return 2
	if ( isPrime ( n - 2 ) ) :
		return 2
	return 3
n = 27
print ( minimumSum ( n ) )