human
Number of sub | Function to return the count of the required substrings.
To store the final answer.
Loop to find the answer.
Condition to update the answer.
Driver code"
Solution in Python:
 ... Write me a code to number of sub and the other steps required?
assistant
#Here is code to number of sub and the other steps required.
 def countSubStr ( strr , lenn ) :
	ans = 0
	for i in range ( lenn ) :
		if ( strr [ i ] == '0' ) :
			ans += ( i + 1 )
	return ans
strr = "10010"
lenn = len ( strr )
print ( countSubStr ( strr , lenn ) )