Buggy python submission (verdict: Runtime Error):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import math

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(math.gcd, A)
print(answer)


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)

Buggy python submission (verdict: Runtime Error):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import math

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

print(reduce(math.gcd, A))


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
import numpy as np

input = stdin.readline

N = int(input())

A = list(map(int,input().split()))

A = set(A)
A = list(A)

def countzero(list):
    i = 0
    for a in list:
        if a == 0:
            i += 1
    return i

while len(A) != 1:
    a = countzero(A)
    A.sort()
    for i in range(a+1,len(A)):
        A[i] = A[i] % A[a]
    if a >= N-1:
        break

i = 0
while True:
    if A[i] != 0:
        print(A[i])
        break
    i += 1


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin

input = stdin.readline

N = int(input())

A = list(map(int,input().split()))

A = set(A)
A = list(A)

a = 0

while len(A) != 1:
    A.sort()
    for i in range(1,len(A)):
        A[i] = A[i] - A[0]
    if A[0] == 0:
        A.pop(0)
    if len(A) <= N/10000:
        break

i = 0
while True:
    if A[i] != 0:
        print(A[i])
        break
    i += 1


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin

input = stdin.readline

N = int(input())

A = list(map(int,input().split()))

A = set(A)
A = list(A)

a = 0

while len(A) != 1:
    A.sort()
    for i in range(1,len(A)):
        A[i] = A[i] - A[0]
    if A[0] == 0:
        A.pop(0)
    if len(A) <= N/100:
        break

i = 0
while True:
    if A[i] != 0:
        print(A[i])
        break
    i += 1


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC118C-MonstersBattleRoyale.py

from sys import stdin

input = stdin.readline

N = int(input())

A = list(map(int,input().split()))

A = set(A)
A = list(A)

a = 0

while len(A) != 1:
    A.sort()
    for i in range(1,len(A)):
        A[i] = A[i] - A[0]
    if A[0] == 0:
        A.pop(0)
    if len(A) <= N/2:
        break

i = 0
while True:
    if A[i] != 0:
        print(A[i])
        break
    i += 1


Fixed submission:
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

A = list(set(map(int,input().split())))

answer = reduce(fractions.gcd, A)
print(answer)