Help me in solving AO17 problem

My issue

iam unable to solve

My code

# Update the code below to solve this problem

t = int(input())
for _ in range(t):
    n = int(input())
    alice = list(map(int, input().split()))
    bob = list(map(int, input().split()))
    
    salice =0
    sbob = 0
    mxalice = -1
    mxbob=-1
    for item in alice:
        salice += item
        if item>mxalice:
            mxalice = item

Learning course: Solve Programming problems using Python
Problem Link: Review problem - 2 Practice Problem in Solve Programming problems using Python - CodeChef

@cmr_21r01a0532
plzz refer the following code

def comp(N,A,B):
    alice=max(A)
    bob=max(B)
    total_alice=sum(A) - alice
    total_bob=sum(B) - bob
    if total_alice<total_bob:
        return "Alice"
    elif total_bob<total_alice:
        return "Bob"
    else:
        return"Draw"
        
T=int (input())
for _ in range(T):
    N=int(input())
    A=list(map(int,input().split()))
    B=list(map(int,input().split()))
    result=comp(N,A,B)
    print(result)