My issue
I have issue with this question, i will write the approach here please help me to solve the problem: from itertools import *
for _ in range(int(input())):
n = int(input())
s = set(map(int,input().split()))
l =
for i in range(1,n+1):
l.append(combinations(s,i))
sum1 = 0
for i in l:
for j in i:
sum1 += max(j) - min(j)
print(sum1)
It gives run time error
My code
# cook your dish here
Problem Link: SETDIFF Problem - CodeChef