Buggy python submission (verdict: Runtime Error):
text = input()
N = text.split("\n")[0]
W = text.split("\n")[1]

#N = int(N[0])
#W = [int(i) for i in W.split(" ")]

ans = 100 * 100

#for T in range(N):
#  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
#  if ans_tmp < ans:
#    ans = ans_tmp

print(ans)


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input()
N, W = text.split("\n")[0], text.split("\n")[1]

#N = int(N[0])
#W = [int(i) for i in W.split(" ")]

ans = 100 * 100

#for T in range(N):
#  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
#  if ans_tmp < ans:
#    ans = ans_tmp

print(ans)


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input()
N, W = text.split("\n")[0], text.split("\n")[1]

N = int(N[0])
W = [int(i) for i in W.split(" ")]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input()
N, W = text.split("\n")[0], text.split("\n")[1]

N = int(N[0])
W = [int(i) for i in W.split()]

ans = 100*100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input()
N, W = text.split("\n")[0], text.split("\n")[1]

N = int(N[0])
W = [int(i) for i in W]

ans = 100*100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input()
N, W = text.split("\n")[0], text.split("\n")[1]

N = int(N)
W = [int(i) for i in W]

ans = 100*100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)

Buggy python submission (verdict: Runtime Error):
text = input().split("\n")
T = int(text[0])
W = [int(i) for i in text[1]]
S_1 = sum(W[:T])
S_2 = sum(W[T:])
print(abs(S_1 - S_2))


Fixed submission:
n_text = input()
w_text = input()

N = int(n_text)
W = w_text.split()

W = [int(i) for i in W]

ans = 100 * 100

for T in range(N):
  ans_tmp = abs(sum(W[:T]) - sum(W[T:]))
  if ans_tmp < ans:
    ans = ans_tmp

print(ans)