Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10 ** 9)
a = int(input())
count = 0
first = 2
def num_div(num):
  a = 2
  while num!=1:
    if num % a == 0:
      num /= a
      while True:
        if num % a ==0:
          num /= a
        elif num == 1:
          return 0
        else:
          return -1
    a += 1

#print(num_div(2))
#sys.exit(0)

while a!=1:
  #素因数は一つ？
  if a % first == 0:
    if num_div(first) == -1:
      first += 1
      continue
    else:
      a /= first
      count += 1
  first += 1
print(count)


Fixed submission:
from collections import Counter

def prime_factor(num):
  factor_list = []
  while num % 2 == 0:
    factor_list.append(2)
    num /= 2
  f = 3
  while f * f <= num:
    if num % f == 0:
      factor_list.append(f)
      num /= f
    else:
      f += 2
  if num!=1:
    factor_list.append(num)
  return factor_list

def get_count(c):
  ans = 0
  _max = c
  for i in range(1,c+1):
    if i <= _max:
      ans += 1
      _max -= i
    else:
      break
  return ans
a = int(input())
counter = Counter(prime_factor(a))
ans = 0
for i in counter:
  ans += get_count(counter[i])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10 ** 9)
a = int(input())
count = 0
first = 2
def num_div(num):
  a = 2
  while num!=1:
    if num % a == 0:
      while True:
        if num % a ==0:
          num /= a
        elif num == 1:
          return 0
        else:
          return -1
    a += 1

#print(num_div(2))
#sys.exit(0)

while a!=1:
  #素因数は一つ？
  if a % first == 0:
    if num_div(first) == -1:
      first += 1
      continue
    else:
      a /= first
      count += 1
  first += 1
print(count)

Fixed submission:
from collections import Counter

def prime_factor(num):
  factor_list = []
  while num % 2 == 0:
    factor_list.append(2)
    num /= 2
  f = 3
  while f * f <= num:
    if num % f == 0:
      factor_list.append(f)
      num /= f
    else:
      f += 2
  if num!=1:
    factor_list.append(num)
  return factor_list

def get_count(c):
  ans = 0
  _max = c
  for i in range(1,c+1):
    if i <= _max:
      ans += 1
      _max -= i
    else:
      break
  return ans
a = int(input())
counter = Counter(prime_factor(a))
ans = 0
for i in counter:
  ans += get_count(counter[i])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10 ** 9)
a = int(input())
count = 0
first = 2
def num_div(num):
  a = 2
  while num!=1:
    if num % a == 0:
      while True:
        if num % a ==0:
          num /= a
        elif num == 1:
          return 0
        else:
          return -1
    a += 1

#print(num_div(2))
#sys.exit(0)

while a!=1:
  #素因数は一つ？
  if num_div(first) == -1:
    first += 1
    continue
  if a % first == 0:
    a /= first
    first += 1
    count += 1
print(count)

Fixed submission:
from collections import Counter

def prime_factor(num):
  factor_list = []
  while num % 2 == 0:
    factor_list.append(2)
    num /= 2
  f = 3
  while f * f <= num:
    if num % f == 0:
      factor_list.append(f)
      num /= f
    else:
      f += 2
  if num!=1:
    factor_list.append(num)
  return factor_list

def get_count(c):
  ans = 0
  _max = c
  for i in range(1,c+1):
    if i <= _max:
      ans += 1
      _max -= i
    else:
      break
  return ans
a = int(input())
counter = Counter(prime_factor(a))
ans = 0
for i in counter:
  ans += get_count(counter[i])
print(ans)