human
Nth term of a sequence formed by sum of current term with product of its largest and smallest digit | Function to find integer.
Because 1 st integer is K itself.
Initialize min_d and max_d.
Updating min_d and max_d.
Break if min digit is 0.
Driver code"
Solution in Python:

=====
Give me a code to nth term of a sequence formed by sum of current term with product of its largest and smallest digit and the other steps required?
assistant
#Here is code to nth term of a sequence formed by sum of current term with product of its largest and smallest digit and the other steps required.
 def find ( K , N ) :
	N = N - 1
	for i in range ( 0 , N ) :
		curr_term = K
		min_d = 9
		max_d = 0
		while curr_term > 0 :
			r = int ( curr_term % 10 )
			min_d = min ( min_d , r )
			max_d = max ( max_d , r )
			curr_term = int ( curr_term / 10 )
		if min_d == 0 :
		break
		K = K + min_d * max_d
		return K
K = 487
N = 2
print ( find ( K , N ) )