Help me in solving AO17 problem

My issue

My code

# Update the code below to solve this problem

t = int(input())
for i in range(t):
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

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

just calculate the sum of the array and then substract the max value of the array then check the values.