NZEC error in python solution of LADDU

I recently submitted the solution to LADDU of DSA learning series and ran into an NZEC error for no reason

t = int(input())
while t:
    t -= 1
    activity, origin = map(str, input().split())
    contest_won, rank = map(str, input().split())
    top_contributor = input()
    bug_found, severity = map(str, input().split())
    contest_hosting = input()

    total = 0
    rank = int(rank)
    severity = int(severity)

    if contest_won == "CONTEST_WON":
        total += 300
        if rank <= 20:
            total += 20 - rank
    if top_contributor == "TOP_CONTRIBUTOR":
        total += 300
    if bug_found == "BUG_FOUND":
        total += severity
    if contest_hosting == "CONTEST_HOSTED":
        total += 50

    if origin == "INDIAN":
        print(total // 200)
    else:
        print(total // 400)

for all the test cases this piece of code outputs the right answers, on local machines, even the codechef ide but poses a problem upon submission. Any help is appreciated.