For this Question: Given a binary sorted non-increasing array arr of size <b>N</b>. You need to print the count of <b>1's</b> in the binary array.

Try to solve the problem using binary searchThe input line contains T, denotes the number of testcases. 
Each test case contains two lines. The first line contains N (size of binary array). The second line contains N elements of binary array separated by space.

<b>Constraints:</b>
1 <= T <= 100
1 <= N <= 10^6
arr[i] = 0,1

<b>Sum of N over all testcases does not exceed 10^6</b>For each testcase in new line, print the count 1's in binary array.Input:
2
8
1 1 1 1 1 0 0 0
8
1 1 0 0 0 0 0 0

Output:
5
2

Explanation:
Testcase 1: Number of 1's in given binary array : 1 1 1 1 1 0 0 0 is 5.
Testcase 2: Number of 1's in given binary array : 1 1 0 0 0 0 0 0 is 2., I have written this Solution Code: c=int(input())
for x in range(c):
	size=int(input())
	s=input()
	print(s.count('1')), In this Programming Language: Python, Now tell me if this Code is compilable or not?