human
Check if all prefixes of a number is divisible by remaining count of digits | Function to check if all prefixes of a number is divisible by remaining count of digits or not.
Traverse and check divisibility for each updated number.
Update the original number.
Given Input.
Function Call"
How can the above be solved in Python?
assistant
#Here is code to check if all prefixes of a number is divisible by remaining count of digits and the other steps required.
 def prefixDivisble ( n ) :
	i = 1
	while n > 0 :
		if n % i != 0 :
			return False
		n = n // 10
		i += 1
	return True
n = 52248
if ( prefixDivisble ( n ) ) :
	print ( " Yes " )
else :
	print ( " No " )