Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int,input().split())
if a < b:
    buf = a
    a = b
    b = buf
while b != 0:
    a, b = b, a % b
gcd = a
count = 1
if gcd % 2 == 0:
    count += 1
    while gcd % 2 == 0:
        gcd = int(gcd / 2)
if gcd % 3 == 0:
    count += 1
    while gcd % 2 == 0:
        gcd = int(gcd / 3)


def hantei(num):
    flag = True
    for i in range(2, int(num**0.5) + 1):
        if num % i == 0:
            flag = False
    return flag


if gcd < 5:
    print(count)
else:
    for i in range(5, gcd + 1, 2):
        if gcd % i == 0 and hantei(i) == True:
            count += 1
            while gcd % i == 0:
                gcd = int(gcd / i)
            if gcd < i+2 :
                print(count)
                exit()
    print(count)


Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int,input().split())
if a < b:
    buf = a
    a = b
    b = buf
while b != 0:
    a, b = b, a % b
gcd = a
count = 1
if gcd % 2 == 0:
    count += 1
    while gcd % 2 == 0:
        gcd = int(gcd / 2)
if gcd % 3 == 0:
    count += 1
    while gcd % 2 == 0:
        gcd = int(gcd / 3)


def hantei(num):
    flag = True
    for i in range(2, int(num**0.5) + 1):
        if num % i == 0:
            flag = False
    return flag


if gcd < 5:
    print(count)
else:
    for i in range(5, gcd + 1, 2):
        if gcd % i == 0 and hantei(i) == True:
            count += 1
            while gcd % i == 0:
                gcd = int(gcd / i)
            if gcd < i+2 :
                print(count)
                exit()
    print(count)


Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int,input().split())
if a < b:
    buf = a
    a = b
    b = buf
while b != 0:
    a, b = b, a % b
gcd = a
count = 1
if gcd % 2 == 0:
    count += 1
    gcd = int(gcd / 2)
if gcd % 3 == 0:
    count += 1
    gcd = int(gcd / 3)


def hantei(num):
    flag = True
    for i in range(2, int(num**0.5) + 1):
        if num % i == 0:
            flag = False
    return flag


if gcd < 5:
    print(count)
else:
    for i in range(5, gcd + 1, 2):
        if gcd % i == 0 and hantei(i) == True:
            count += 1
            gcd = int(gcd / i)
    print(count)


Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int,input().split())
if a < b:
    buf = a
    a = b
    b = buf
while b != 0:
    a, b = b, a % b
gcd = a
count = 1
if gcd % 2 == 0:
    count += 1
    gcd = int(gcd / 2)
if gcd % 3 == 0:
    count += 1
    gcd = int(gcd / 3)


def hantei(num):
    flag = True
    for i in range(2, int(num**0.5) + 1):
        if num % i == 0:
            flag = False
    return flag


if gcd < 5:
    print(count)
else:
    for i in range(5, gcd + 1):
        if gcd % i == 0 and hantei(i) == True:
            count += 1
    print(count)

Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int,input().split())
if a < b:
    buf = a
    a = b
    b = buf
while b != 0:
    a, b = b, a % b
gcd = a
count = 1
if gcd % 2 == 0:
    count += 1
if gcd % 3 == 0:
    count += 1


def hantei(num):
    flag = True
    for i in range(2, int(num**0.5+1)):
        if num % i == 0:
            flag = False
    return flag


if gcd < 5:
    print(count)
else:
    for i in range(5, gcd + 1):
        if gcd % i == 0 and hantei(i) == True:
            count += 1
    print(count)

Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)

Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int,input().split())
gcd = math.gcd(a,b)
count = 1
if gcd % 2 == 0:
    count += 1
if gcd % 3 == 0:
    count += 1


def hantei(num):
    flag = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            flag = False
    return flag


for i in range(5, gcd + 1):
    if gcd % i == 0 and hantei(i) == True:
        count += 1
print(count)


Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

a, b = map(int,input().split())
g = gcd(a,b)
count = 0
for i in range(2, int(g**0.5)+2):
    if g % i == 0:
        count += 1
        while g % i == 0:
            g //= i
if g != 1:
    count += 1
print(count+1)