Buggy python submission (verdict: Runtime Error):
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

from collections import defaultdict
def get_primefactor(n: int) -> dict:
    f = defaultdict(int)
    p = 2
    while p * p <= n:
        while n % p == 0:
            f[p] += 1
        p += 1 if p == 2 else 2
    return f

a, b = map(int, input().split())
factors = factorize(GCD(a, b))

ans = len(factors) + 1

print(ans)


Fixed submission:
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

def get_divisor(n: int) -> list:
    divisor = []
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            divisor.append(i)
            if i != n // i:
                divisor.append(n // i)
    divisor.sort()
    return divisor

a, b = map(int, input().split())
divisor =  get_divisor(GCD(a, b))

ans = 1
used = [0] * len(divisor)
used[0] = 1
for i in range(1, len(divisor)):
    if used[i] == 0:
        ans += 1
        for j in range(i+1, len(divisor)):
            if used[j] == 0 and divisor[j] % divisor[i] == 0:
                used[j] = 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

from collections import defaultdict
def factorize(n: int) -> dict:
    f = defaultdict(int)
    p = 2
    while n > 1:
        while n % p == 0:
            f[p] += 1
            n = n // p
        p += 1 if p == 2 else 2
    return f

a, b = map(int, input().split())
factors = factorize(GCD(a, b))

ans = len(factors) + 1

print(ans)


Fixed submission:
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

def get_divisor(n: int) -> list:
    divisor = []
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            divisor.append(i)
            if i != n // i:
                divisor.append(n // i)
    divisor.sort()
    return divisor

a, b = map(int, input().split())
divisor =  get_divisor(GCD(a, b))

ans = 1
used = [0] * len(divisor)
used[0] = 1
for i in range(1, len(divisor)):
    if used[i] == 0:
        ans += 1
        for j in range(i+1, len(divisor)):
            if used[j] == 0 and divisor[j] % divisor[i] == 0:
                used[j] = 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

from collections import defaultdict
def factorize(n: int) -> dict:
    f = defaultdict(int)
    p = 2
    while n > 1:
        while n % p == 0:
            f[p] += 1
            n = n // p
        p += 1 if p == 2 else 2
    return f

a, b = map(int, input().split())
factors = factorize(GCD(a, b))

ans = len(factors) + 1

print(ans)


Fixed submission:
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

def get_divisor(n: int) -> list:
    divisor = []
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            divisor.append(i)
            if i != n // i:
                divisor.append(n // i)
    divisor.sort()
    return divisor

a, b = map(int, input().split())
divisor =  get_divisor(GCD(a, b))

ans = 1
used = [0] * len(divisor)
used[0] = 1
for i in range(1, len(divisor)):
    if used[i] == 0:
        ans += 1
        for j in range(i+1, len(divisor)):
            if used[j] == 0 and divisor[j] % divisor[i] == 0:
                used[j] = 1

print(ans)