human
Give me a code to find count of digits in a number that divide the number and the other steps required given the following:
Find count of digits in a number that divide the number | Return the number of digits that divides the number ..
Fetching each digit of the number.
Checking if digit is greater than 0 and can divides n ..
Driven Code"
Solution in Python:
assistant
#Here is code to find count of digits in a number that divide the number and the other steps required.
 def countDigit ( n ) :
	temp = n
	count = 0
	while temp != 0 :
		d = temp % 10
		temp //= 10
		if d > 0 and n % d == 0 :
			count += 1
	return count
n = 1012
print ( countDigit ( n ) )