human
What is a code to gCD of a number raised to some power and another number and the other steps required given the following:
GCD of a number raised to some power and another number | Python 3 program to find GCD of a ^ n and b ..
Returns GCD of a ^ n and b ..
Driver code"
Solution in Python:
assistant
#Here is code to gCD of a number raised to some power and another number and the other steps required.
 def gcd ( a , b ) :
	if ( a == 0 ) :
		return b
	return gcd ( b % a , a )
def powGCD ( a , n , b ) :
	for i in range ( 0 , n + 1 , 1 ) :
		a = a * a
	return gcd ( a , b )
if __name__ == ' _ _ main _ _ ' :
	a = 10
	b = 5
	n = 2
	print ( powGCD ( a , n , b ) )