Print digits for each array element that does not divide any digit of that element | Function to find digits for each array element that doesn 't divide any digit of the that element ; Traverse the array arr [ ] ; Iterate over the range [ 2 , 9 ] ; Stores if there exists any digit in arr [ i ] which is divisible by j ; If any digit of the number is divisible by j ; If the digit j doesn 't  divide any digit of arr[i] ; Driver Code
def indivisibleDigits ( arr , N ) : NEW_LINE INDENT for i in range ( N ) : NEW_LINE INDENT num = 0 NEW_LINE print ( arr [ i ] , end = ' ▁ ' ) NEW_LINE for j in range ( 2 , 10 ) : NEW_LINE INDENT temp = arr [ i ] NEW_LINE flag = True NEW_LINE while ( temp > 0 ) : NEW_LINE INDENT if ( ( temp % 10 ) != 0 and ( temp % 10 ) % j == 0 ) : NEW_LINE INDENT flag = False NEW_LINE break NEW_LINE DEDENT temp //= 10 NEW_LINE DEDENT if ( flag ) : NEW_LINE INDENT print ( j , end = ' ▁ ' ) NEW_LINE DEDENT DEDENT print ( ) NEW_LINE DEDENT DEDENT arr = [ 4162 , 1152 , 99842 ] NEW_LINE N = len ( arr ) NEW_LINE indivisibleDigits ( arr , N ) NEW_LINE