human
Find last five digits of a given five digit number raised to power five | Function to find the last five digits of a five digit number raised to power five.
Driver code"
How can the above be solved in Python?
 Give me a code to find last five digits of a given five digit number raised to power five and the other steps required?
assistant
#Here is code to find last five digits of a given five digit number raised to power five and the other steps required.
 def lastFiveDigits ( n ) :
	n = ( ( int ) ( n / 10000 ) * 10000 + ( ( int ) ( n / 100 ) % 10 ) * 1000 + ( n % 10 ) * 100 + ( ( int ) ( n / 10 ) % 10 ) * 10 + ( int ) ( n / 1000 ) % 10 )
	ans = 1
	for i in range ( 5 ) :
		ans *= n
		ans %= 100000
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	n = 12345
	lastFiveDigits ( n )