human
Find the smallest positive number which can not be represented by given digits | Function to find the smallest positive number which can not be represented by given digits.
Storing the count of 0 digit or store the value at 0 th index.
Calculates the min value in the array starting from 1 st index and also store its index ..
If its value at 0 th index is less than min value than either 10 , 100 , 1000 ... can 't be expressed.
If its value is greater than min value then iterate the loop upto first min value index and simply print its index value ..
Driver code.
Value of N is always 10 as we take digit from 0 to 9.
Calling function"
Solution in Python:
 What is a code to find the smallest positive number which can not be represented by given digits and the other steps required?
assistant
#Here is code to find the smallest positive number which can not be represented by given digits and the other steps required.
 def expressDigit ( arr , n ) :
	min = 9
	index = 0
	temp = 0
	temp = arr [ 0 ]
	for i in range ( 1 , 10 ) :
		if ( arr [ i ] < min ) :
			min = arr [ i ]
			index = i
	if ( temp < min ) :
		print ( 1 , end = " " )
		for i in range ( 1 , temp + 1 ) :
			print ( 0 , end = " " )
	else :
		for i in range ( min ) :
			print ( index , end = " " )
		print ( index )
arr = [ 2 , 2 , 1 , 2 , 1 , 1 , 3 , 1 , 1 , 1 ]
N = 10
expressDigit ( arr , N )