|All-time Popular Problems|
|Maximum difference between node and its ancestor|
|Delete a node from BST|
|K’th smallest element|
|Detect cycle in a directed graph|
|Element with left side smaller and right side greater|
|Sort The Array|
|Level order traversal Line by Line|
|Add two numbers represented by linked lists|
|Root to leaf path sum|
Given a binary string of size n. you have to count all substring that has even value in its decimal form.
Note: we convert binary String Into decimal from left to right ( 10010:- in Decimal: 9 ).
Input: The first line of input contains an integer T i.e number of the test case. each test case contains n (that is the size of binary string ) and a Binary string of size n.
output: For each test case, In new line print the total count of even binary string.
1 <= T <= 1000
Test Case 1 : substring are : 0 , 01 , 1 in decimal form : 0 , 2 , 1 so total: 2 even decimal value.