Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02639 (python)

Fixed submission:
x=list(map(int,input().split()))
print(x.index(0)+1)

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=int(input())

crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")
Problem p02640 (python)

Fixed submission:
X,Y=map(int,input().split())
q=0

if(Y%2==1):
    q=1
    print("No")

if q==0:
    print(X*2<=Y and Y<=X*4 and "Yes" or "No")

Buggy submission (verdict: Runtime Error):
X,Y=map(int,input().split())

a=(4*X-Y)/2

if a.is_integer() and a>0:
    q=1
    print("Yes")

a=(8*X-Y)/4

if q==0:
    if a.is_integer() and a>0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=int(input())

crain=(4*X-Y)/2
if crain.is_integer() and crain>0:
    crain = int(crain)
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
X=input()
Y=input()
crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")
Problem p03943 (python)

Fixed submission:
a,b,c = map(int,input().split())

if a+b == c:
    print("Yes")
elif a+c == b:
    print("Yes")
elif a == b+c:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

if a+b == c:
    print("Yes")
elif:
    a+c == b:
    print("Yes")
elif:
    a == b+c:
    print("Yes")
else:
    print("No")
Problem p03963 (python)

Fixed submission:
x = list(map(int,input().split()))
a = x[0]
b = x[1]
print(b*((b-1) ** (a-1)))

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().strip())
b = a[0] #色の数
c = a[1] #ボールの数

ans  = (b*(b-1)**(c-1))
print(ans)
Problem p03998 (python)

Fixed submission:
s=[input() for i in range(3)]
l=[len(s[i]) for i in range(3)]
abc=[0,0,0]
now=0
while abc[now]!=l[now]:
    s_sub=s[now][abc[now]]
    abc[now]+=1
    now=(0 if s_sub=="a" else 1 if s_sub=="b" else 2)
print("A" if now==0 else "B" if now==1 else "C")

Buggy submission (verdict: Runtime Error):
a = list(input())
b = list(input())
c = list(input())
x = "d"
a_idx = 0
b_idx = 0
c_idx = 0
while True:
    if x == "a":
        if a_idx == len(a):
            print("A")
            break
        else:
            x = str(a[a_idx])
            a_idx += 1
    elif x == "b":
        if b_idx == len(b):
            print(B)
            break
        else:
            x = str(b[b_idx])
            b_idx += 1
    elif x == "c":
        if c_idx == len(c):
            print("C")
            break
        else:
            x = str(c[c_idx])
            c_idx += 1
    else:
        x = "a"

Buggy submission (verdict: Runtime Error):
a = list(input())
b = list(input())
c = list(input())
x = "d"
a_idx = 0
b_idx = 0
c_idx = 0
while a_idx != len(a) -1 and b_idx != len(b) -1 and c_idx != len(c) -1:
    if x == "a":
        x = str(a[a_idx])
        a_idx += 1
    elif x == "b":
        x = str(b[b_idx])
        b_odx += 1
    elif x == "c":
        x = str(c[c_idx])
        c_idx += 1
    else:
        x = "a"
if a_idx == len(a) -1 :
    print("A")
elif b_idx == len(b)-1:
    print("B")
else:
    print("C")
Problem p03999 (python)

Fixed submission:
s = input()
l = len(s)

ans = 0
for i in range(2 ** (l -1)):
    ans_sub = 0
    subst = s[0]
    for j in range(l-1):
        if(i>>j)&1:
            ans_sub += int(subst)
            subst = s[j+1]
        else:
            subst += s[j+1]
        if j ==l-2:
            ans_sub += int(subst)
    ans += ans_sub
if l == 1:
    print(int(s))
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
def dfs(i,f):
    if i == n-1:
        return sum(list(map(int,input().split("+"))))
    return dfs(i+1,f+s[i+1]) + dfs[i+1,f + "+" + s[i+1]]

s = input()
n = len(s)
print(dfs(0,s[0]))
Problem p04011 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = 0

for i in range(1,a+1):
  if i >= b+1:
    e += d
  else:
    e += c
print(e)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = 0

for i in range(1,a+1):
  if i >= b+1:
    e += d
    else:
      e += c
      print(e)
Problem p04012 (python)

Fixed submission:
a = list(input())
even_number = [x for x in range(0,101,2)]
tmp_list = []
tmp_set = set(a)

tmp_list = [a.count(x) for x in tmp_set]
if all(x % 2 == 0 for x in tmp_list) == True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = list(input())
even_number = range(0,101,2)
values,count = *zip(a.most_common())

if even_number in count:
  print("Yes")
else:
  print("No")
Problem p04029 (python)

Fixed submission:
a = int(input())
b = 0
for i in range(a+1):
    b += int(i)
print(b)

Buggy submission (verdict: Runtime Error):
a = list(input())
b = []
for i in a:
    if a.count(i) >= len(a)/2:
        b = [j for j ,x in enumerate(a) if x == i]
    else:
        pass
if not b:
  print(-1,1)
else:
  print(b[0],b[1])
Problem p04030 (python)

Fixed submission:
a = list(input())
b = []
for i,j in enumerate(a):
    if j == str("0"):
        b += str("0")
    elif j == str("1"):
        b += str("1")
    elif j == str("B"):
        if not b:
            pass
        else:
            del b[len(b)-1]
        
print("".join(b))

Buggy submission (verdict: Runtime Error):
a = list(input())
b = []
for i,j in enumerate(a):
    if j == str("0"):
        b += str("0")
    elif j == str("1"):
        b += str("1")
    elif j == str("B"):
        if not b:
            pass
        else:
            del b[i-1]
        
print("".join(b))

Buggy submission (verdict: Runtime Error):
a = list(input())
b = []
for i,j in enumerate(a):
    if j == str("0"):
        b += str("0")
    elif j == str("1"):
        b += str("1")
    elif j == str("B"):
        if a[0] == str("B"):
            pass
        else:
            del b[i-1]
        
print("".join(b))

Buggy submission (verdict: Runtime Error):
a = list(input())
b = []
for i,j in enumerate(a):
    if j == str("0"):
        b += str("0")
    elif j == str("1"):
        b += str("1")
    else:
        del b[i-1]
print("".join(b))
Problem p04031 (python)

Fixed submission:
a = int(input())
b = list(map(int,input().split()))
ans = 4000000

for i in range(-100,101):
    ans_sub = 0
    for j in range(a):
        ans_sub += (b[j]-i)**2
    ans = min(ans,ans_sub)
print(ans)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,input().split()))
c = int(input())
d = 0

for i in b:
    d += (int(i) - int(c)) ** 2
print(d)
Problem p04043 (python)

Fixed submission:
from sys import stdin

A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

if A + B + C == 17 and A >= 5 and B >= 5 and C >= 5:
        print("YES")
else:
        print("NO")

Buggy submission (verdict: Runtime Error):
from sys import stdin

A,B,C = [int(x) for x in stdin.realine().rstrip().split()]

if A+B+C == 17 and A>=5 and B>=5 and C>=5:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())

if A+B+C == 17 and A >= 5 and B >= 5 and C >= 5:
  print("YES")
else:
  print("NO")
Problem p02583 (python)

Fixed submission:
n=int(input())
lst=list(map(int,input().strip().split()))[:n]
count=0 
for i in range(0,n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            if(lst[i]!=lst[j] and lst[j]!=lst[k] and lst[k]!=lst[i]):
                if (lst[i] +lst[j] > lst[k] and 
                    lst[i] + lst[k] > lst[j] and 
                    lst[k] + lst[j] > lst[i]): 
                    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
lst=list(map(int,input().strip().split()))[:n]
print(findnumberofTriangles(lst))
count=0 
for i in range(0,n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            if(lst[i]!=lst[j] and lst[j]!=lst[k] and lst[k]!=lst[i]):
                if (lst[i] +lst[j] > lst[k] and 
                    lst[i] + lst[k] > lst[j] and 
                    lst[k] + lst[j] > lst[i]): 
                    count += 1
print(count)
Problem p02958 (python)

Fixed submission:
N = int(input())
p = list(map(int, input().split()))
n = [i+1 for i in range(N)]
c = 0
for i in range(N):
    if n[i] != p[i]:
        c += 1
if c == 0 or c == 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
p = list(map(int, input().split()))
n = [i+1 in range(N)]
c = 0
for i in range(N):
  if n[i] != p[i]:
    c += 1
if c == 0 or c == 2:
  print("YES")
else:
  print("NO")
Problem p03005 (python)

Fixed submission:
N, K = map(int, input().split())
print(N%K)

Buggy submission (verdict: Runtime Error):
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
if N == 1:
    print(1)
    exit()
xy.sort(key = lambda x:x[0])
d = {}
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        tmp = (xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
        if not tmp in d:
            d[tmp] = 0
        d[tmp] += 1
        #print(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
    #print()
d = sorted(d.items(), key = lambda x:-x[1])
print(N - d[0][1])
Problem p03006 (python)

Fixed submission:
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
if N == 1:
    print(1)
    exit()
xy.sort(key = lambda x:x[0])
d = {}
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        tmp = (xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
        if not tmp in d:
            d[tmp] = 0
        d[tmp] += 1
        #print(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
    #print()
d = sorted(d.items(), key = lambda x:-x[1])
print(N - d[0][1])

Buggy submission (verdict: Runtime Error):
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
xy.sort(key = lambda x:x[0])
d = {}
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        tmp = (xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
        if not tmp in d:
            d[tmp] = 0
        d[tmp] += 1
        #print(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])
    #print()
d = sorted(d.items(), key = lambda x:-x[1])
print(N - d[0][1])
Problem p03294 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))

res = sum([i-1 for i in a])
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
print(sum(a) - len(a))
Problem p03330 (python)

Fixed submission:
from itertools import permutations
from collections import deque
from collections import Counter
N, C = map(int, input().split())
d = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(int, input().split())) for _ in range(N)]

r0 = deque()
r1 = deque()
r2 = deque()
for i in range(N):
    for j in range(N):
        rest = (i+1+j+1) % 3
        if rest == 0:
            r0.append(c[i][j]-1)
        elif rest == 1:
            r1.append(c[i][j]-1)
        else:
            r2.append(c[i][j]-1)
c0 = Counter(r0)
c1 = Counter(r1)
c2 = Counter(r2)
ans = 10**10
for p in permutations([i for i in range(C)], 3):
    point = 0
    point += sum([d[k][p[0]]* v for k, v in c0.items()])
    point += sum([d[k][p[1]]* v for k, v in c1.items()])
    point += sum([d[k][p[2]]* v for k, v in c2.items()])
    ans = min(ans, point)
print(ans)

Buggy submission (verdict: Runtime Error):
from itertools import permutations
from collections import deque
from collections import Counter
N, C = map(int, input().split())
d = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(int, input().split())) for _ in range(N)]

r0 = deque()
r1 = deque()
r2 = deque()
for i in range(N):
    for j in range(N):
        rest = (i+1+j+1) % 3
        if rest == 0:
            r0.append(c[i][j]-1)
        elif rest == 1:
            r1.append(c[i][j]-1)
        else:
            r2.append(c[i][j]-1)
c0 = Counter(r0)
c1 = Counter(r1)
c2 = Counter(r2)
ans = 10**10
for p in permutations([i for i in range(C)], 3):
    point = 0
    point += sum([d[k][p[0] * v] for k, v in c0.items()])
    point += sum([d[k][p[1] * v] for k, v in c1.items()])
    point += sum([d[k][p[2] * v] for k, v in c2.items()])
    ans = min(ans, point)
print(ans)
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
if h == 1 and w == 1:
    print("Yes")
    exit()

for i in range(h):
    for j in range(w):
        if s[i][j] == "#":
            f = False
            if 0 <= i+1 < h and 0 <= j < w and s[i+1][j] == "#":
                f = True
            if 0 <= i-1 < h and 0 <= j < w and s[i-1][j] == "#":
                f = True
            if 0 <= i < h and 0 <= j+1 < w and s[i][j+1] == "#":
                f = True
            if 0 <= i < h and 0 <= j-1 < w and s[i][j-1] == "#":
                f = True
            if not f:
                print("No")
                exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j] == "#":
            f = False
            if 0 <= j+1 < h and 0 <= i < w and s[i][j+1] == "#":
                f = True
            if 0 <= j-1 < h and 0 <= i < w and s[i][j-1] == "#":
                f = True
            if 0 <= j < h and 0 <= i+1 < w and s[i+1][j] == "#":
                f = True
            if 0 <= j < h and 0 <= i-1 < w and s[i-1][j] == "#":
                f = True
            if not f:
                print("No")
                exit()
print("Yes")
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
res = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      total = i*500 + j*100 + k*50
      if total == x:
        res += 1
print(res)

Buggy submission (verdict: Runtime Error):
a = int(inpu())
b = int(inpu())
c = int(inpu())
x = int(inpu())
res = 0
for i in range(a):
  for j in range(b):
    for k in range(c):
      total = i * 500 + j * 100 + c * 50
      if total == x:
        res += 1
print(res)

Buggy submission (verdict: Runtime Error):
a = int(inpu())
b = int(inpu())
c = int(inpu())
x = int(inpu())
res = 0
for i in range(a):
  for j in range(b):
    for k in range(c):
      total = i * 500 + j * 100 + c * 50
      if total == x:
        res += 1
Problem p03493 (python)

Fixed submission:
s = input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s = input()
print(s.count("1!)
Problem p03494 (python)

Fixed submission:
i = int(input())
num = list(map(int, input().split()))
count = 0
while True:
  flag = False
  for k in range(i):
    if num[k] % 2 != 0:
      flag = True
  if flag:
    break
  for k in range(i):
    num[k] /= 2
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] /= 2
    if type(num[k]) is float:
      break
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] =/ 2
    if type(num[k]) is float or num[k] == 0:
      break
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
i = int(input())
num = map(int, input().split())
count = 0
while True:
  for k in range(i):
    num[k] = num[k] / 2
    if type(num[k]) is float:
      break
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
i = int(input())
num = map(int, input().split())
count = 0
while True:
  if type(sum(num/2)) is float:
    break
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
i = int(input())
num = map(int, input().split())
count = 0
while True:
  if(type(sum(num/2)) == "float"):
    break
  count += 1
print(count)
Problem p03503 (python)

Fixed submission:
n = int(input())
f = [list(map(int, input().split())) for _ in range(n)]
p = [list(map(int, input().split())) for _ in range(n)]
res = -10**10
for i in range(1, 1<<10):
    count = [0 for _ in range(n)]
    for j in range(10):
        for k in range(n):
            if (i>>j)&1 == 1 and f[k][10-j-1] == 1:
                count[k] += 1
    total = 0
    for k in range(n):
        total += p[k][count[k]]
    res = max(res, total)
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
f = [list(map(int, input().split())) for _ in range(n)]
p = [list(map(int, input().split())) for _ in range(n)]
res = -10**10
for i in range(1, 1<<10):
    count = [0 for _ in range(10)]
    for j in range(10):
        for k in range(n):
            if (i>>j)&1 == 1 and f[k][j] == 1:
                count[k] += 1
    total = 0
    for k in range(n):
        total += p[k][count[k]]
    res = max(res, total)
print(res)
Problem p03633 (python)

Fixed submission:
n = int(input())
t = [int(input()) for _ in range(n)]

# 最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)
# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)
res = 1
for i in range(n):
    res = lcm(res, t[i])
print(res)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(200000000)
n = int(input())

if n == 1:
    print(t[0])
    exit()
# 最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)
# 最小公倍数
def lcm(a, b):
    return a * b / gcd(a, b)
res = 1
for i in range(n):
    t = int(input())
    res = int(lcm(res, t))
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
t = [int(input()) for _ in range(n)]

if n == 1:
    print(t[0])
    exit()
# 最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)
# 最小公倍数
def lcm(a, b):
    return a * b / gcd(a, b)
res = int(lcm(t[0], t[1]))
for i in range(2, n):
    res = int(lcm(res, t[i]))
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
t = [int(input()) for _ in range(n)]

if n == 1:
    print(t[0])
    exit()
# 最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)
# 最小公倍数
def lcm(a, b):
    return a * b / gcd(a, b)
res = lcm(t[0], t[1])
for i in range(2, n):
    res = lcm(res, t[i])
print(int(res))
Problem p03778 (python)

Fixed submission:
w, a, b = map(int, input().split())
if abs(a-b) <= w:
    print(0)
else:
    print(min(abs(b-a-w), abs(a-b-w)))

Buggy submission (verdict: Runtime Error):
w, a, b = map(int, input().split())
if abs(a-b) <= w:
    print(0)
else:
    print(min(abs(b-a-w), abs(a-b-w))
Problem p02584 (python)

Fixed submission:
x,k,d=map(int,(input().split()))

x=abs(x)
zx=x
if x<d*k:
    wk,x=divmod(abs(x),d)
    k-=wk    
else:
    x-=d*k
    k=0

for i in range(k):
    xm=abs(x+d)
    xu=abs(x-d)
    x=min(xm,xu)
    k-=1
    if zx+x==d:
        if k%2!=0:
            x=zx
            break
        else:
            break
    zx=x
    
print(x)

Buggy submission (verdict: Runtime Error):
x,k,d=map(int,(input().split()))

zx=x
if abs(x)<d*k:
    wk,x=divmod(abs(x),d)
    k-=wk    
else:
    abs(x)-=d*k
    k=0

for i in range(k):
    xm=abs(x+d)
    xu=abs(x-d)
    x=min(xm,xu)
    k-=1
    if zx+x==d:
        if k%2!=0:
            x=zx
            break
        else:
            break
    zx=x
    
print(x)
Problem p02608 (python)

Fixed submission:
def ff(x,y,z):
    return(x**2+y**2+z**2+x*y+y*z+z*x)

n=int(input())
an=[0]*n
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            wk=ff(i,j,k)
            if wk<=n:
                an[wk-1]+=1
for i in an:
    print(i)

Buggy submission (verdict: Runtime Error):
def ff(x,y,z):
    return(x**2+y**2+z**2+x*y+y*z+z*x)
 
n=int(input())
an = []
for i in range(1,50):
    for j in range(1,50):
        for k in range(1,50):
            wk=ff(i,j,k)
            if wk<n:
                an.append(wk)
            else:
                break
ann=set(an)
annn=sorted(ann)
wk =0
for i in range(1,n+1):
    if i ==annn[wk]:
        print(3)
        if wk+1>=len(annn):
            pass
        else:
            wk+=1
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
def ff(x,y,z):
    return(x**2+y**2+z**2+x*y+y*z+z*x)

n=int(input())
an = []
for i in range(1,50):
    for j in range(1,50):
        for k in range(1,50):
            wk=ff(i,j,k)
            if wk<n:
                an.append(wk)
            else:
                break
ann=set(an)
annn=sorted(ann)
wk =0
for i in range(1,n+1):
    if i ==annn[wk]:
        print(3)
        if wk+1>=len(annn):
            pass
        else:
            wk+=1
    else:
        print(0)
Problem p02642 (python)

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys

n = int(input())
aa = np.array(list(map(int,input().split())))

a=[i for i in aa if np.count_nonzero(aa==i)<2]
a=np.unique(a)
ah=[1]*len(a)

if len(ah) ==0:
    print(0)
    sys.exit()
for i in range(n-1):
    if ah[i]==1:
        for j in range(i+1,n):
            wk0=a[j]%a[i]
            if wk0==0:
                ah[j]=0

print(sum(ah))
Problem p02660 (python)

Fixed submission:
def fc(n):
    wk =0
    for i in range(2,int(n**0.5)):
        j=i
        while n%j == 0:
            wk+=1
            n//=j 
            j*=i
        while n%i==0:
            n//=i
            continue
    if n!=1:
        wk+=1
    return wk

n =int(input())
print(fc(n))

Buggy submission (verdict: Runtime Error):
def fc(n):
    wk =0
    h=0
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            wk+=1
            n//=i
            h=i
    if n!=1 and h < n:
        wk+=1
    return wk
 
n =int(input()

Buggy submission (verdict: Runtime Error):
def fc(n):
    wk =0
    h=0
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            wk+=1
            n//=i
            h=i
    if n!=1 and h <
     n:
        wk+=1
    return wk

n =int(input())

print(fc(n))