NZEC error (ZCO13001)

I’m getting NZEC runtime error for my solution for the problem https://www.codechef.com/ZCOPRAC/problems/ZCO13001.

def sub(q):
    return list(combinations(q,2))

n=int(input())
l=[int(i) for i in input().split(" ")]

c=0
for i in sub(l):
    c+=abs(i[0]-i[1])
        
print(c)

Please help!

We can’t see your submissions. Use
`` ` instead