Why this showing runtime error?
type or paste code here
T = int(input())
for i in range(T):
n, x = map(int, input().split(' '))
arr = list(map(int, input().split(' ')))
allowed = n-x
set1=set(arr)
total= len(set1)
if total>=allowed:
print(allowed)
elif allowed>total:
print(total)