Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
import functools
def gcd_list(x):
    return functools.reduce(math.gcd, x)

n = int(input())
a = input()
a = re.split(" ",a)
a = list(map(int,a))

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if (j != i):
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)

Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
import functools
def gcd_list(numbers):
    return functools.reduce(math.gcd, numbers)

n = int(input())
a = input()
a = re.split(" ",a)
a = list(map(int,a))

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if j != i:
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)

Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
print(gcd_list([1]))
n = int(input())
a = input()
a = re.split(" ",a)
a = list(map(int,a))

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if j != i:
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)


Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
from functools import reduce

n = int(input())
a = input()
a = re.split(" ",a)
a = list(map(int,a))
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if j != i:
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)

Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
from functools import reduce

n = int(input())

a = input()
a = re.split(" ",a)
a = list(map(int,a))
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if j != i:
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)

Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
#C
import numpy as np
import math
import re
from functools import reduce

n = int(input())

a = input()
a = re.split(" ",a)
a = list(map(int,a))
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

m = 0
for i in range(n):
    s = []
    for j in range(n):
        if j != i:
            s.append(a[j])
    x = gcd_list(s)
    if(x > m):
        m = x
print(m)


Fixed submission:
#!/usr/bin/env python3
#C
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

N = int(input())
A = list(map(int,input().split()))
L=[0]*(N+2)
R=[0]*(N+2)
L[0] = A[0]
R[N-1] = A[N-1]
for i in range(1,N):
    L[i] = gcd(L[i-1],A[i])
for i in range(N-2,-1,-1):
    R[i] = gcd(R[i+1],A[i])

ans = 0
for i in range(N):
    ans = max(ans,gcd(L[i-1],R[i+1]))
print(ans)