My issue
i have typed correct code but it seems showing error still
My code
t = int(input())
for _ in range(t):
n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2==0:
count= n // 2
else:
count= n // 2 + 1
i= n // 2
while i > 0:
if a[i] == a[i - 1]:
count = count+1
i = i-1
else:
break
print(count)
# update the code below to solve this problem
Learning course: Kalasalingam Academy of Research and Education
Problem Link: CodeChef: Practical coding for everyone