Buggy python submission (verdict: Time Limit Exceeded):
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break

print(ans+1)

Fixed submission:
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break
if temp != 1:
  ans += 1

print(ans+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,100000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break

print(ans+1)

Fixed submission:
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break
if temp != 1:
  ans += 1

print(ans+1)

Buggy python submission (verdict: Time Limit Exceeded):
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

primes = [2]
def is_prime(p):
  for i in range(len(primes)):
    if p % primes[i] == 0:
      return False
    if primes[i] * primes[i] >= p:
      break
  return True

for p in range(3, 1000009, 2):
  if is_prime(p):
    primes.append(p)
ans = 0
for p in primes:
  if temp % p == 0:
    ans += 1
print(ans+1)

Fixed submission:
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break
if temp != 1:
  ans += 1

print(ans+1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
    return s if l % s == 0 else gcd(s, l % s)
g = gcd(a, b)
primes = []
if g % 2 == 0:
    primes.append(2)
def prime(n):
    for i in range(len(primes)):
        if n % primes[i] == 0:
            return False
    return True
def make():
    for i in range(3, g + 1, 2):
        if g%i == 0 and prime(i):
            primes.append(i)

make()

print(len([i for i in primes if g % i == 0]) + 1)

Fixed submission:
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break
if temp != 1:
  ans += 1

print(ans+1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
    return s if l % s == 0 else gcd(s, l % s)
g = gcd(a, b)
primes = []
if g % 2 == 0:
    primes.append(2)
def prime(n):
    for i in range(len(primes)):
        if n % primes[i] == 0:
            return False
    return True
def make():
    for i in range(3, g + 1, 2):
        if prime(i):
            primes.append(i)

make()

print(len([i for i in primes if g % i == 0]) + 1)

Fixed submission:
a, b = list(map(int, input().split(' ')))
def gcd(l, s):
  return l if s == 0 else gcd(s, l % s)

temp = gcd(a, b)

ans = 0
for i in range(2,1000000):
  if temp % i == 0:
    ans += 1
    while temp % i == 0:
      temp = temp // i
  if temp == 1:
    break
if temp != 1:
  ans += 1

print(ans+1)