Skip to content
Snippets Groups Projects
6.py 232 B
Newer Older
hacker717's avatar
hacker717 committed
arr = []
for _ in range(int(input())):
    arr.append(int(input()))
    if len(arr) <= 1:
        continue
    a, b = sorted(arr)

    while a != b:
        b, a = a, b - a
        a, b = sorted([a, b])

    arr = [a]

print(arr[0])