human
Can you provide a code to number of subsequences in a string divisible by n and the other steps required given the following:
Number of subsequences in a string divisible by n | Returns count of subsequences of str divisible by n ..
division by n can leave only n remainder [ 0. . n - 1 ] . dp [ i ] [ j ] indicates number of subsequences in string [ 0. . i ] which leaves remainder j after division by n ..
Filling value for first digit in str.
start a new subsequence with index i.
exclude i 'th character from all the  current subsequences of string [0...i-1].
include i 'th character in all the current  subsequences of string [0...i-1].
Driver code"
Solution in Python:
assistant
#Here is code to number of subsequences in a string divisible by n and the other steps required.
 def countDivisibleSubseq ( str , n ) :
	l = len ( str )
	dp = [ [ 0 for x in range ( l ) ] for y in range ( n ) ]
	dp [ 0 ] [ ( ord ( str [ 0 ] ) - ord ( '0' ) ) % n ] += 1
	for i in range ( 1 , l ) :
		dp [ i ] [ ( ord ( str [ i ] ) - ord ( '0' ) ) % n ] += 1
		for j in range ( n ) :
			dp [ i ] [ j ] += dp [ i - 1 ] [ j ]
			dp [ i ] [ ( j * 10 + ( ord ( str [ i ] ) - ord ( '0' ) ) ) % n ] += dp [ i - 1 ] [ j ]
	return dp [ l - 1 ] [ 0 ]
if __name__ == " _ _ main _ _ " :
	str = "1234"
	n = 4
	print ( countDivisibleSubseq ( str , n ) )