Buggy python submission (verdict: Runtime Error):
import math
import collections
 
N = int(input())
prime_number = False
ans = 0
 
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor
 
list_num = trial_division(N)
 
if prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
    counter = collections.Counter(prime_list)
    for key,val in counter.items():
      temp = val
      for i in range(1,val+1):
        if temp-i > 0:
          temp -= i
          ans += 1
        elif temp-i == 0:
          temp -= i
          ans += 1
          break
        else
          break
    
print(ans)

Fixed submission:
import math
import collections
 
N = int(input())
prime_number = False
ans = 0
 
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor

list_num = trial_division(N)

if N == 1:
  ans = 0
elif prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
  else:
    prime_list = list_num
  counter = collections.Counter(prime_list)
  for key,val in counter.items():
    temp = val
    for i in range(1,val+1):
      if temp-i > 0:
        temp -= i
        ans += 1
      elif temp-i == 0:
        temp -= i
        ans += 1
        break
      else:
        break
    
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
import collections

N = int(input())
prime_number = False
ans = 0

def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor

list_num = trial_division(N)

if prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
    counter = collections.Counter(prime_list)
    for key,val in counter.items():
      temp = val
      for i in range(1,val+1):
        if temp-i > 0:
          temp -= i
          ans += 1
        elif temp-i == 0:
          temp -= i
          ans += 1
          break
        elsea
          break
    
print(ans)

Fixed submission:
import math
import collections
 
N = int(input())
prime_number = False
ans = 0
 
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
      global prime_number
      prime_number = True
      return
    else:
        factor.append(n)
        return factor

list_num = trial_division(N)

if N == 1:
  ans = 0
elif prime_number:
  ans = 1
else:
  if 1 in list_num:
    prime_list = list_num[:-1]
  else:
    prime_list = list_num
  counter = collections.Counter(prime_list)
  for key,val in counter.items():
    temp = val
    for i in range(1,val+1):
      if temp-i > 0:
        temp -= i
        ans += 1
      elif temp-i == 0:
        temp -= i
        ans += 1
        break
      else:
        break
    
print(ans)