Help me in solving AO19 problem

My issue

i think, i have solved this one, custom input is passing correctly but actual test case have some problem

My code

# Update the code below to solve this problem

t = int(input())
for i in range(t):
    N, A, B = map(int, input().split())
    faces=list(map(int,input().split()))
    list1=[]
    for i in faces:
        if i not in list1:
            list1.append(i)
    a=1/len(list1)
    print(float(a/len(list1)))

Learning course: Solve Programming problems using Python
Problem Link: CodeChef: Practical coding for everyone