Buggy python submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):

p=list(map(int,input().split()))
n=input()
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split(" ")))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split(" ")))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p=list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

Buggy python submission (verdict: Runtime Error):
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n):
    s1 = sum(p[:i])
    s2 = sum(p[i:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

Fixed submission:
n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)