Buggy python submission (verdict: Runtime Error):
x, y = [int(i) for i in input().split()]
if x < y:
    buff = x
    x = y
    y = buff

r = x % y

for i in range(1, r):
    if y % i == 0 and r % i == 0:
        gcd = i

print(gcd)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Runtime Error):
x, y = [int(i) for i in input().split()]
if x < y:
    buff = x
    x = y
    y = buff

r = x % y

for i in range(1, r):
    if y % i == 0 and r % i == 0:
        gcd = i

print(gcd)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Runtime Error):
x, y = [int(i) for i in input().split()]
if x < y:
    buff = x
    x = y
    y = buff

r = x % y

for i in range(1, r):
    if y % i == 0 and r % i == 0:
        gcd = i

print(gcd)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Runtime Error):
# GCD
x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff

r = x % y
for i in range(1, r+1):
    if y % i == 0 and r % i == 0:
        d = i

print(d)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Runtime Error):
# GCD
x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff

r = x % y
for i in range(1, r+1):
    if y % i == 0 and r % i == 0:
        d = i

print(d)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Time Limit Exceeded):
# GCD
x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

r = x % y
for i in range(1, r+1):
    if y % i == 0 and r % i == 0:
        d = i

print(d)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)

Buggy python submission (verdict: Time Limit Exceeded):
# GCD
x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

r = x % y
for i in range(1, r+1):
    if y % i == 0 and r % i == 0:
        d = i

print(d)

Fixed submission:
# GCD
def gcd(x, y):
    if x % y > 0:
        r = x % y
        d = gcd(y, r)
    else:
        d = y

    return d


x, y = [int(i) for i in input().split()]

if x < y:
    buff = x
    x = y
    y = buff
elif x == y:
    print(x)
    exit()

d = gcd(x, y)

print(d)