human
K | Python3 code to compute k - th digit in a ^ b.
computin a ^ b in python.
getting last digit.
increasing count by 1.
if current number is required digit.
remove last digit.
driver code"
Solution in Python:
 ... Give me a code to k and the other steps required?
assistant
#Here is code to k and the other steps required.
 def kthdigit ( a , b , k ) :
	p = a ** b
	count = 0
	while ( p > 0 and count < k ) :
		rem = p % 10
		count = count + 1
		if ( count == k ) :
			return rem
		p = p / 10 ;
a = 5
b = 2
k = 1
ans = kthdigit ( a , b , k )
print ( ans )