Buggy python submission (verdict: Time Limit Exceeded):
import fractions
A,B=map(int,input().split())

gcd=fractions.gcd(A,B)
count=1

for i in range(2,gcd+1):
    if gcd!=1:
        if gcd%i==0:
            #print(gcd)
            count+=1
            #print(i)
            while gcd%i==0:
                gcd//=i
    else:
        break
print(count)
    

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1

i=2
while base!=1 or i<pow(base,1/2):
    if base%i==0:
        count+=1
        while base%i==0:
            base//=i
    i+=1
if base!=1:
    count+=1
print(count)

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1

i=2
while base>1:
    if base%i==0:
        count+=1
        while base%i==0:
            base//=i
        
    i+=1
print(count)

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
A,B=map(int,input().split())

li=[]
count=1

for i in range(2,fractions.gcd(A,B)+1):
    judge=True
    if A%i==0 and B%i==0:
        for l in li:
            if i%l==0:
                judge=False
        if judge==True:
            li.append(i)

print(len(li)+1)
    

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
A,B=map(int,input().split())

li=[]
base=[]
count=1

for i in range(2,fractions.gcd(A,B)+1):
    if min(A,B)%i==0 and max(A,B)%i==0:
        li.append(i)
        if max(A,B)%(min(A,B)//i)==0:
            li.append(min(A,B)//i)
li=sorted(li)
for l in li:
    judge=True
    for k in base:
        if l%k==0:
            judge=False
            break
    if judge==True:
        count+=1
        base.append(l)
print(count)
    

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int,input().split())

li=[]
base=[]
count=1

for i in range(2,math.gcd(A,B)+1):
    if min(A,B)%i==0 and max(A,B)%i==0:
        li.append(i)
        if max(A,B)%(min(A,B)//i)==0:
            li.append(min(A,B)//i)

for l in li:
    judge=True
    for k in base:
        if l%k==0:
            judge=False
            break
    if judge==True:
        count+=1
        base.append(l)
print(count)
    

Fixed submission:
import fractions
A,B=map(int,input().split())

base=fractions.gcd(A,B)
count=1


for i in range(2,int(pow(base,1/2)+1)):
    if base==1:
        break
    else:
        if base%i==0:
            count+=1
            while base%i==0:
                base//=i
if base!=1:
    count+=1
print(count)