Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
 
print(arr[max_index])

Fixed submission:
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
    elif N == 1:
        max_index=0
 
print(arr[max_index])

Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
 
print(arr[max_index])

Fixed submission:
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
    elif N == 1:
        max_index=0
 
print(arr[max_index])

Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num
 
max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
 
print(arr[max_index])

Fixed submission:
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
    elif N == 1:
        max_index=0
 
print(arr[max_index])

Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num
 
max_index = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
 
print(arr[max_index])

Fixed submission:
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
    elif N == 1:
        max_index=0
 
print(arr[max_index])
Buggy python submission (verdict: Runtime Error):
a = input()

for i in range(3):
  if a[i] == a[i+1]:
    print("Bad")
    return
print("Good")

Fixed submission:
a = input()

def check():
  for i in range(3):
    if a[i] == a[i+1]:
      print("Bad")
      return 
  print("Good")

check()

Buggy python submission (verdict: Runtime Error):
a, b, c, d = (int(i) for i in input().split())

if a != b:
  if: b != c:
      if: c != d:
          print("Good")
          return 0
        
print("Bad")


Fixed submission:
a = input()

def check():
  for i in range(3):
    if a[i] == a[i+1]:
      print("Bad")
      return 
  print("Good")

check()

Buggy python submission (verdict: Runtime Error):
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)
    if x%y == 0:
        return y
    else:
        while x%y!=0:
            z = x%y
            x = y
            y = z
        else:
            return z

# import math
a, b, c, d = map(int, input().split())
b_c = int(b/c)
b_d = int(b/d)
cd = int(c * d / gcd(c,d))
b_cd = int(b / cd)
bn = b_c + b_d - b_cd
# print("bn:",bn)
a -= 1
a_c = int(a/c)
a_d = int(a/d)
a_cd = int(a / cd)
an = a_c + a_d - a_cd
# print("an:",an)

num = b - a - (bn - an)
print(num)

Fixed submission:
S = input()
text = "Good"
for i in range(3):
    if S[i] == S[i+1]:
        text = "Bad"
print(text)

Buggy python submission (verdict: Runtime Error):
import fractions

A, B, C, D = map(int, input().split())

A -= 1

lcm = (C * D) // fractions.gcd(C, D)

excluded = A - (A // C + A // D - A // lcm)
num = B - (B // C + B // D - B // lcm)

print(num - excluded)

Fixed submission:
S = input()

if S[0] != S[1] and S[1] != S[2] and S[2] != S[3]:
    print('Good')
else:
    print('Bad')
Buggy python submission (verdict: Runtime Error):
import math

A, B, C, D = map(int, input().split())

A -= 1

lcm = (C * D) // math.gcd(C, D)

excluded = A - (A // C + A // D - A // lcm)
num = B - (B // C + B // D - B // lcm)

print(num - excluded)

Fixed submission:
import fractions

A, B, C, D = map(int, input().split())

A -= 1

lcm = (C * D) // fractions.gcd(C, D)

excluded = A - (A // C + A // D - A // lcm)
num = B - (B // C + B // D - B // lcm)

print(num - excluded)
Buggy python submission (verdict: Runtime Error):
l = [int(input()) for i in range(6)]
if l[4] - l[0] =< l[5]:
    print("Yay!")
else:
    print(":(")

Fixed submission:
l = [int(input()) for i in range(6)]
if l[4] - l[0] <= l[5]:
    print("Yay!")
else:
    print(":(")

Buggy python submission (verdict: Runtime Error):
l = [input() for i in range(6)]
if l[4] - l[0] < l[5]:
    print("Yay!")
else:
    print(":(")

Fixed submission:
l = [int(input()) for i in range(6)]
if l[4] - l[0] <= l[5]:
    print("Yay!")
else:
    print(":(")
Buggy python submission (verdict: Time Limit Exceeded):
A,B = map(int, input().split())
ans = 0
for i in range(A,B+1):
    if i == A:
        ans = A
    else:
        ans ^= i
print(ans)

Fixed submission:
A,B = map(int, input().split())


def f(n):
    if n%4 == 0:
        return n
    elif n%4 == 1:
        return 1
    elif n%4 == 2:
        return n ^ (n-1) ^ (n-2)
    elif n%4 == 3:
        return 0

print(f(A-1)^f(B))
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

for i, j in enumerate(range(k)):
    if i % 2 == 0:
        if a % 2 == 1:
            a = a - 1
        b = b + a // 2
        a = a // 2
    elif i % 2 == 1:
        if b % 2 == 1:
            b = b - 1
        a = a + b // 2
        b = b // 2

print(a, b)


Fixed submission:
S = input()

if len(S) == 2:
    print(S)
else:
    print(S[::-1])
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d = map(int,input().split())
count = 0

for i in range(a,b+1):
	if(i%c != 0 and i%d != 0):
		count += 1
print(count)

Fixed submission:
a,b,c,d = map(int,input().split())
x,y = c,d

while y != 0:
	x,y =y,x%y
x = (c*d)//x

count1 = b - (b//c + b//d -b//x)
count2 = (a - 1) - ((a-1)//c + (a-1)//d -(a-1)//x) 
print(count1 - count2)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
k = 0
S = 0

if N%2 == 0:
    k = (N+1)*N//2
else:
    k = (N+1)*(N//2)+(N+1)//2

Sum_A = sum(A)    
b = (sum_A-k)//N

print(sum_A-(b*N+k))

Fixed submission:
N = int(input())
if N%2 == 0:
    print(N)
else:
    print(N*2)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
 
if A <= 8:
    if B <= 8:
        print('Yay!')
    else:
        print( ':(') 
else:
    print( ':(')

Fixed submission:
A,B = map(int,input().split())
 
if A <= 8:
    if B <= 8:
        print('Yay!')
    else:
        print( ':(') 
else:
    print( ':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A>8 or B>8:
    print( ':(')    
else:
    print('Yay!')

Fixed submission:
A,B = map(int,input().split())
 
if A <= 8:
    if B <= 8:
        print('Yay!')
    else:
        print( ':(') 
else:
    print( ':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A>8 or B>8:
    print( ':(')    
else:
    print('Yay!')

Fixed submission:
A,B = map(int,input().split())
 
if A <= 8:
    if B <= 8:
        print('Yay!')
    else:
        print( ':(') 
else:
    print( ':(')
Buggy python submission (verdict: Runtime Error):
H,W,D = map(int,input().split())
A = []

for i in range(H):
    AH = map(int,input().split())
    A.append(list(AH))
Q = int(input())

for l in range(Q):
    s=0
    L,R = map(int,input().split())
    
    while L != R:
        for m in A:
            if L in m:
                i=A.index(m)
                j=m.index(L)
            if L+D in m:
                x=A.index(m)
                y=m.index(L+D)
                
        L +=D
        s += abs(x-i)+abs(y-j)
            
    print(s)

Fixed submission:
N = int(input())
print(N//3)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S ="MARCH"
S2 = [0]*len(S)
n=0

for i in range(N):
    s = input()
    for k, j in enumerate(S2):
        if s[0] == j:
            S2[k]+=1
            
for i in range(len(S2)):
    for j in range(i+1,len(S2)):
        for k in range(j+1,len(S2)):
            n +=S2[i]*S2[j]*S2[k]
    
print(n)


Fixed submission:
N = int(input())
print(N//3)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S ="MARCH"
S2 = [0]*len(S)
n=0

for i in range(N):
    s = input()
    for k, j in enumerate(S1):
        if s[0] == j:
            S2[k]+=1
            
for i in range(len(S2)):
    for j in range(i+1,len(S2)):
        for k in range(j+1,len(S2)):
            n +=S2[i]*S2[j]*S2[k]
    
print(n)

Fixed submission:
N = int(input())
S ="MARCH"
S2 = [0]*len(S)
n=0

for i in range(N):
    s = input()
    for k, j in enumerate(S):
        if s[0] == j:
            S2[k]+=1
            
for i in range(len(S2)):
    for j in range(i+1,len(S2)):
        for k in range(j+1,len(S2)):
            n +=S2[i]*S2[j]*S2[k]
    
print(n)
Buggy python submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
N = int(input())
print(lcm(2,N))


Fixed submission:
def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a
def lcm(x, y):
    return (x * y) // gcd(x, y)
N = int(input())
print(lcm(2,N))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
multi_0 = [a for a in range(1,100)]
multi_100 = [a for a in range(100,10001) if a % 100 == 0]
multi_10000 = [a for a in range(10000, 1000001) if a % 10000 == 0]

D, N = map(int, input().split())
if D == 0:
    print(multi_0[N-1])
elif D == 1:
    print(multi_100[N-1])
elif D == 2:
    print(multi_10000[N-1])

Fixed submission:
# -*- coding: utf-8 -*-
multi_0 = [a for a in range(1,100)]
multi_100 = [a for a in range(100,10000) if a % 100 == 0]
multi_10000 = [a for a in range(10000, 1000000) if a % 10000 == 0]

multi_0 += [101]
multi_100 += [10100]
multi_10000 += [1010000]

D, N = map(int, input().split())
if D == 0:
    print(multi_0[N-1])
elif D == 1:
    print(multi_100[N-1])
elif D == 2:
    print(multi_10000[N-1])
Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))

if a[0]-a[1]==0 or a[1]-a[2]==0 or a[2]-a[3]==0:
    print("Bad")
else:
    print("Good")

Fixed submission:
a = list(map(int, input()))

if a[0]-a[1]==0 or a[1]-a[2]==0 or a[2]-a[3]==0:
    print("Bad")
else:
    print("Good")

Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))

if a[0]-a[1]=0 or a[1]-a[2]=0 or a[2]-a[3]=0:
    print("Bad")
else:
    print("Good")

Fixed submission:
a = list(map(int, input()))

if a[0]-a[1]==0 or a[1]-a[2]==0 or a[2]-a[3]==0:
    print("Bad")
else:
    print("Good")

Buggy python submission (verdict: Runtime Error):
a = int(input().split())

if a[0]-a[1]=0 or a[1]-a[2]=0 or a[2]-a[3]=0:
    print("Bad")
else:
    print("Good")

Fixed submission:
a = list(map(int, input()))

if a[0]-a[1]==0 or a[1]-a[2]==0 or a[2]-a[3]==0:
    print("Bad")
else:
    print("Good")

Buggy python submission (verdict: Runtime Error):
a = int(input().split())

if a[0]-a[1]=0 or a[1]-a[2]=0 or a[2]-a[3]=0 or a[3]-a[4]=0:
    print("Bad")
else:
    print("Good")

Fixed submission:
a = list(map(int, input()))

if a[0]-a[1]==0 or a[1]-a[2]==0 or a[2]-a[3]==0:
    print("Bad")
else:
    print("Good")
Buggy python submission (verdict: Runtime Error):
a = input()

a = list(a)
b = a[0]+a[1]
c = a[2]+a[3]

b = int(b)
c = int(c)

if c >= 1 and c <= 12 and b >= 1 and b <= 12:
        print("AMBIGUOUS")

elif c >= 1 and c <= 12:
    print("YYMM")

elif b >= 1 and b <= 12:
    print("MMYY")
    
else:
    print('NA')

Fixed submission:
n = list(map(int, input().split()))
a = input()
a = list(a)


if a[n[1]-1] == "A":
    a[n[1]-1] = "a"
if a[n[1]-1] == "B":
    a[n[1]-1] = "b"
if a[n[1]-1] == "C":
    a[n[1]-1] = "c"
    
ch = ""
for i in a:
    ch += str(i)
print(ch)

Buggy python submission (verdict: Runtime Error):
a = input()

a = list(a)
b = a[0]+a[1]
c = a[2]+a[3]

b = int(b)
c = int(c)

if c >= 1 and c <= 12 and b >= 1 and b <= 12:
        print("AMBIGUOUS")

elif c >= 1 and c <= 12:
    print("YYMM")

elif b >= 1 and b <= 12:
    print("MMYY")
    
else:
    print('NA')

Fixed submission:
n = list(map(int, input().split()))
a = input()
a = list(a)


if a[n[1]-1] == "A":
    a[n[1]-1] = "a"
if a[n[1]-1] == "B":
    a[n[1]-1] = "b"
if a[n[1]-1] == "C":
    a[n[1]-1] = "c"
    
ch = ""
for i in a:
    ch += str(i)
print(ch)

Buggy python submission (verdict: Runtime Error):
n = list(map(int, input().split()))
a = input()
a = list(a)

if a[n[1]] == "A":
    a[n[1]] = "a"
if a[n[1]] == "B":
    a[n[1]] = "b"
if a[n[1]] == "C":
    a[n[1]] = "c"
print(a)

Fixed submission:
n = list(map(int, input().split()))
a = input()
a = list(a)


if a[n[1]-1] == "A":
    a[n[1]-1] = "a"
if a[n[1]-1] == "B":
    a[n[1]-1] = "b"
if a[n[1]-1] == "C":
    a[n[1]-1] = "c"
    
ch = ""
for i in a:
    ch += str(i)
print(ch)

Buggy python submission (verdict: Runtime Error):
n = list(map(int, input().split()))
a = input()


if a[n[1]] == "A":
    a[n[1]] ="a"
if a[n[1]] == "B":
    a[n[1]] ="b"
if a[n[1]] == "C":
    a[n[1]] ="c"

Fixed submission:
n = list(map(int, input().split()))
a = input()
a = list(a)


if a[n[1]-1] == "A":
    a[n[1]-1] = "a"
if a[n[1]-1] == "B":
    a[n[1]-1] = "b"
if a[n[1]-1] == "C":
    a[n[1]-1] = "c"
    
ch = ""
for i in a:
    ch += str(i)
print(ch)
Buggy python submission (verdict: Runtime Error):
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        ans += 1
prit(ans)

Fixed submission:
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c == x:
        ans += 1
prit(ans)

Fixed submission:
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a*b % 2 == 0
print('Odd')
else:
  print('Even')

Fixed submission:
a, b = map(int, input().split())
 
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
Buggy python submission (verdict: Time Limit Exceeded):
n, y = list(map(int, input().split()))
ans = 0

for i in range(0, n+1):
    a1 = 10000 * i
    for j in range(0, n+1):
        a2 = 5000 * j
        for k in range(0, n+1):
            a3 = 1000 * k
            if a1 + a2 + a3  == y and i + j + k == n:
                print(i, j , k)
                ans += 1
                break
    if ans == 1:
        break
if ans == 0:
    print(-1, -1, -1)

Fixed submission:
n, y = list(map(int, input().split()))
ans = 0

for i in range(n+1):
    a1 = 10000 * i
    for j in range(n+1-i):
        a2 = 5000 * j
        k = n- (i+j)
        a3 = k*1000
        if a1 + a2 + a3  == y and i + j + k == n:
            print(i, j , k)
            ans += 1
            exit(0)
    if ans == 1:
        break
if ans == 0:
    print(-1, -1, -1)

Buggy python submission (verdict: Runtime Error):
n, y = list(map(int, input().split()))

for i in y:
  for j in y:
    for k in y:
      if i / 10000  + j / 5000 + k / 1000 == 0 and i + j + k == n:
        print(i, j , k)
      else:
        print(-1, -1, -1)

Fixed submission:
n, y = list(map(int, input().split()))
ans = 0

for i in range(n+1):
    a1 = 10000 * i
    for j in range(n+1-i):
        a2 = 5000 * j
        k = n- (i+j)
        a3 = k*1000
        if a1 + a2 + a3  == y and i + j + k == n:
            print(i, j , k)
            ans += 1
            exit(0)
    if ans == 1:
        break
if ans == 0:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().spliit()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().spliit()]
ans = 0

while True:
  if a%2 == 1:
    break
  a = a//2 
  ans += 1
print(ans)

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0

while True:
  if a%2 == 1:
    break
  a = a//2 
  ans += 1
print(ans)

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0

while True:
  if a%2 == 1:
    break
  ans += 1
print(ans)

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 1

while True:
  if a%2 == 1:
    print(0)
  print(ans)
  ans += 1

Fixed submission:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().spliit()]
ans = 0

while True:
  if [i for i in a if a%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())
ans = 1

while True:
  if a%2 == 1:
    print(0)
  print(ans)
  ans += 1

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = int(input())
 
aji = [(i+1)+L-1 for i in range(N)]
min = min(list(map(abs, aji)))
print(sum(aji)-min)

Fixed submission:
input_number = int(input())
 
a = input_number//1000
b = (input_number-1000*a)//100
c = (input_number-1000*a-100*b)//10
d = input_number-1000*a-100*b-c*10
if a==b:
	print('Bad')
elif b==c:
	print('Bad')
elif c==d:
	print('Bad')
else:
    print('Good')

Buggy python submission (verdict: Runtime Error):
input_number = int(input())

a = input_number//1000
b = (input_number-1000*a)//100
c = (input_number-1000*a-100*b)//10
d = input_number-1000*a-100*b-c*10
if a==b;
	print('Bad')
elif b==c;
	print('Bad')
elif c==d;
	print('Bad')
else:
    print('Good')

Fixed submission:
input_number = int(input())
 
a = input_number//1000
b = (input_number-1000*a)//100
c = (input_number-1000*a-100*b)//10
d = input_number-1000*a-100*b-c*10
if a==b:
	print('Bad')
elif b==c:
	print('Bad')
elif c==d:
	print('Bad')
else:
    print('Good')
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = int(input())

aji = [(i+1)+L-1 for i in range(N)]
abs = list(map(abs, aji))
index = abs.index(min(abs))

print(sum(aji)-aji[index])

Fixed submission:
N,L = input().split()

aji = [(i+1)+int(L)-1 for i in range(int(N))]
abs = list(map(abs, aji))
index = abs.index(min(abs))

print(sum(aji)-aji[index])

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = int(input())

aji = [(i+1)+L-1 for i in range(N)]
min = min(list(map(abs, aji)))
print(sum(aji)-min)

Fixed submission:
N,L = input().split()

aji = [(i+1)+int(L)-1 for i in range(int(N))]
abs = list(map(abs, aji))
index = abs.index(min(abs))

print(sum(aji)-aji[index])

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = int(input())

aji = [(i+1)+L-1 for i in range(N)]
min = min(list(map(aji, abs)))
print(sum(aji)-min)

Fixed submission:
N,L = input().split()

aji = [(i+1)+int(L)-1 for i in range(int(N))]
abs = list(map(abs, aji))
index = abs.index(min(abs))

print(sum(aji)-aji[index])
Buggy python submission (verdict: Runtime Error):
import sys
a, b, c = map(int, raw_input().split())
i=0
while 1:
  c = a*c - b
  print c
  i = i + 1
  if i > 9 :
      sys.exit()


Fixed submission:
# -*- coding: utf-8 -*-
import sys
# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
# 文字列の入力

if a < 6:
  result = b/2
  print 0
  sys.exit()

if 6 <= a and a <= 12 :
  result = b/2
  print result
  sys.exit()
result = b
print result

Buggy python submission (verdict: Runtime Error):
import sys
a, b, c = map(int, raw_input().split())
i=0
while 1:
  c = a*c - b
  print c
  i = i + 1
  if i > 9 :
      sys.exit()


Fixed submission:
# -*- coding: utf-8 -*-
import sys
# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
# 文字列の入力

if a < 6:
  result = b/2
  print 0
  sys.exit()

if 6 <= a and a <= 12 :
  result = b/2
  print result
  sys.exit()
result = b
print result

Buggy python submission (verdict: Runtime Error):
import sys
a, b, c = map(int, raw_input().split())
i=0
while 1:
  c = a*c - b
  print c
  i = i + 1
  if i > 10 :
      sys.exit()


Fixed submission:
# -*- coding: utf-8 -*-
import sys
# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
# 文字列の入力

if a < 6:
  result = b/2
  print 0
  sys.exit()

if 6 <= a and a <= 12 :
  result = b/2
  print result
  sys.exit()
result = b
print result
Buggy python submission (verdict: Runtime Error):
s=list(input())

ans = 'Good'

while i-1 < range(s):
  if s[i] == s[i+1]:
    ans = 'Bad'
    print(ans)
    break
  elif :
    i += 1
    
print(ans)
  	

Fixed submission:
s=list(input())

ans = 'Good'
i = 0

while i+1 < len(s):
  if s[i] == s[i+1]:
    ans = 'Bad'
    break
  else:
    i += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n,x = map(int,input().split())
li = list(map(int,input().split()))

d = 0
ans = 0

for i in range(n):
    if d <= x:
        ans += 1
        d += li[i]
    else
        d += li[i]

print(ans)

Fixed submission:
n, x = map(int,input().split())
li = list(map(int,input().split()))

d = 0
ans = 0

if d <= x:
    ans = 1
else:
    ans = 0

for i in range(n):
    d += li[i]
    if d <= x:
        ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
n,x = map(int,input().split())
li = list(map(int,input().split()))

d = 0
ans = 0

for i in range(n):
    if d <= x:
        ans += 1
        d += li[i]
    else
        d += li[i]

return(ans)

Fixed submission:
n, x = map(int,input().split())
li = list(map(int,input().split()))

d = 0
ans = 0

if d <= x:
    ans = 1
else:
    ans = 0

for i in range(n):
    d += li[i]
    if d <= x:
        ans += 1

print(ans)