human
Check whether a given number is Polydivisible or Not | function to check polydivisible number.
digit extraction of input number.
store the digits in an array.
n contains first i digits.
n should be divisible by i.
Driver Code"
Solution in Python:
assistant
#Here is code to check whether a given number is Polydivisible or Not and the other steps required.
 def check_polydivisible ( n ) :
	N = n
	digit = [ ]
	while ( n > 0 ) :
		digit . append ( n % 10 )
		n /= 10
	digit . reverse ( )
	flag = True
	n = digit [ 0 ]
	for i in range ( 1 , len ( digit ) , 1 ) :
		n = n * 10 + digit [ i ]
		if ( n % ( i + 1 ) != 0 ) :
			flag = False
			break
	if ( flag ) :
		print ( N , " is ▁ Polydivisible ▁ number . " ) ;
	else :
		print ( N , " is ▁ Not ▁ Polydivisible ▁ number . " )
if __name__ == ' _ _ main _ _ ' :
	n = 345654
	check_polydivisible ( n )