Help me in solving AO19 problem

My issue

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())

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

The logic is quite simple like u have to count the frequency of A in x[n] then divide the freq by n and store it in some variable . similarly do it for B count its frequency in x[n] and divide its freq by n as well and store it in separate variable and the answer would be their multiplication.