human
Count of unique digits in a given number N | Function that returns the count of unique digits of the given number.
Initialize a variable to store count of unique digits.
Initialize cnt list to store digit count.
Iterate through the digits of N.
Retrieve the last digit of N.
Increase the count of the last digit.
Remove the last digit of N.
Iterate through the cnt list.
If frequency of digit is 1.
Increment the count of unique digits.
Return the count of unique digit.
Given number N.
Function call"
Solution in Python:
assistant
#Here is code to count of unique digits in a given number N and the other steps required.
 def countUniqueDigits ( N ) :
	res = 0
	cnt = [ 0 ] * 10
	while ( N > 0 ) :
		rem = N % 10
		cnt [ rem ] += 1
		N = N // 10
	for i in range ( 10 ) :
		if ( cnt [ i ] == 1 ) :
			res += 1
	return res
N = 2234262
print ( countUniqueDigits ( N ) )