General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
163733793 Practice:
han369
1688B - 44 PyPy 3-64 Accepted 171 ms 16592 KB 2022-07-12 05:39:17 2022-07-12 05:39:17
→ Source
import math
t=int(input())
for i in range(0,t):
	n=int(input())
	a=[int(x) for x in input().split(' ')]
	c=0
	m=float('inf')
	for i in a:
		if(i%2==1):
			c+=1
		m=min(m,int(math.log2(i&(-i))))
	if(c>0):
		print(n-c)
	else:
		print(n-1+m)
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details