i am unable understand why i get this ???

Here is my code http://www.codechef.com/viewsolution/1858904

```
t = int(input())
for j in range(t):
lis = []
n = int(input())
lis = raw_input().split()
lis = map(int,lis)
lis.sort(reverse = True)
coreA = lis[0]
coreB = 0
for i in range(1,n):
if coreA > coreB:
coreB = coreB+lis[i]
else:
coreA = coreA+lis[i]
print abs(coreA-coreB)
```