Problem:


Score : 400 points

Problem Statement

Given is a positive integer N. Consider repeatedly applying the operation below on N:

First, choose a positive integer z satisfying all of the conditions below:

z can be represented as z=p^e, where p is a prime number and e is a positive integer;

z divides N;

z is different from all integers chosen in previous operations.

Then, replace N with N/z.

Find the maximum number of times the operation can be applied.

Constraints

All values in input are integers.

1 \leq N \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N

Output

Print the maximum number of times the operation can be applied.

Sample Input 1

24

Sample Output 1

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=12.)

Choose z=3 (=3^1). (Now we have N=4.)

Choose z=4 (=2^2). (Now we have N=1.)

Sample Input 2

1

Sample Output 2

0

We cannot apply the operation at all.

Sample Input 3

64

Sample Output 3

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=32.)

Choose z=4 (=2^2). (Now we have N=8.)

Choose z=8 (=2^3). (Now we have N=1.)

Sample Input 4

1000000007

Sample Output 4

1

We can apply the operation once by, for example, making the following choice:

z=1000000007 (=1000000007^1). (Now we have N=1.)

Sample Input 5

997764507000

Sample Output 5

7



Sample input:
24


Sample output:
3

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
Nb = N
Nc = N
so = []
#counta = 0
for i in range(2,int(math.sqrt(N))+1):
  if N % i == 0:
#    counta += 1
    countb = 1
    #print(N,i**countb)
    while N % (i**countb) == 0:
      #print(i**countb)
      N //= i**countb
      so.append(i**countb)
      countb += 1
#print(so,counta)
so.sort()
#print(so,len(so))
countc = 0
for i in range(len(so)):
  if Nb % so[i] == 0:
    Nb /= so[i]
    countc += 1
    print(countc)
  else:
    break
if countc == 0 and Nc >= 2:
  countc = 1
print(countc)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
ans = 0
def primes(n):
    is_p = [True]*(n + 1)
    is_p[0] = False
    is_p[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_p[i]:
            continue
        for j in range(i*2, n+1, i):
            is_p[j] = False
    return [i for i in range(n+1) if is_p[i]]

p = primes(10**6)

dp = []
cl = []
n1 = n
for i in p:
    if n%i == 0:
        cl.append(i)
    while n%i == 0:
        n = n/i
        dp.append(i)
    if n == 1:
        break
if n == n1 and n != 1:
    ans = 1

c = Counter(dp)

for i in cl:
    cnt = 1
    while c[i] >= cnt:
        c[i] -= cnt
        ans += 1
        cnt += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
ans = 0
def primes(n):
    is_p = [True]*(n + 1)
    is_p[0] = False
    is_p[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_p[i]:
            continue
        for j in range(i*2, n+1, i):
            is_p[j] = False
    return [i for i in range(n+1) if is_p[i]]

p = primes(10**6)

dp = []
cl = []
n1 = n
for i in p:
    if n%i == 0:
        cl.append(i)
    while n%i == 0:
        n = n/i
        dp.append(i)
    if n == 1:
        break
if n == n1:
    ans = 1

c = Counter(dp)

for i in cl:
    cnt = 1
    while c[i] >= cnt:
        c[i] -= cnt
        ans += 1
        cnt += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
ans = 0
def primes(n):
    is_p = [True]*(n + 1)
    is_p[0] = False
    is_p[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_p[i]:
            continue
        for j in range(i*2, n+1, i):
            is_p[j] = False
    return [i for i in range(n+1) if is_p[i]]

p = primes(10**6)

dp = []
cl = []
n1 = n
for i in p:
    if n%i == 0:
        cl.append(i)
    while n%i == 0:
        n = n/i
        dp.append(i)
    if n == 1:
        break
if n == n1:
    dp.append(n)
    cl.append(n)

c = Counter(dp)

for i in cl:
    cnt = 1
    while c[i] >= cnt:
        c[i] -= cnt
        ans += 1
        cnt += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
ans = 0
def primes(n):
    is_p = [True]*(n + 1)
    is_p[0] = False
    is_p[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_p[i]:
            continue
        for j in range(i*2, n+1, i):
            is_p[j] = False
    return [i for i in range(n+1) if is_p[i]]

p = primes(10**7)

dp = []
cl = []
n1 = n
for i in p:
    if n%i == 0:
        cl.append(i)
    while n%i == 0:
        n = n/i
        dp.append(i)
    if n == 1:
        break
    if n == n1:
        ans = 1

c = Counter(dp)


for i in cl:
    cnt = 1
    while c[i] >= cnt:
        c[i] -= cnt
        ans += 1
        cnt += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
ans = 0
def primes(n):
    is_p = [True]*(n + 1)
    is_p[0] = False
    is_p[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_p[i]:
            continue
        for j in range(i*2, n+1, i):
            is_p[j] = False
    return [i for i in range(n+1) if is_p[i]]

p = primes(10**6)

dp = []
cl = []
n1 = n
for i in p:
    if n%i == 0:
        cl.append(i)
    while n%i == 0:
        n = n/i
        dp.append(i)
    if n == 1:
        break
    if n == n1:
        ans = 1

c = Counter(dp)


for i in cl:
    cnt = 1
    while c[i] >= cnt:
        c[i] -= cnt
        ans += 1
        cnt += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
n=int(input())
d=defaultdict(int)

while n%2==0:
  n//=2
  d[2]+=1
f=3

while f*f<n:
  if n%f==0:
    n//=f
    d[f]+=1
  else:
    f+=2
if n!=1:
  d[n]+=1
c=0
for k,v in d.items():
  i=1
  while v>=i:
    v-=i
    c+=1
    i+=1
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())

def factrization(m):
    temp = m
    ans = 0
    for i in range(2, int(n**0.5) + 1):
        if temp % i == 0:
            cnt = 0
            e = 1
            while temp % i == 0:
                cnt += 1
                temp //= i
                if cnt == e:
                    e += 1
                    cnt -= 1
                    ans += 1

    if temp != 1:
        ans += 1

    return ans

print(factrization(n))

Submission status: Wrong Answer

Solution code:
n=int(input())
import math
if n==1:
    print(1)
else:
    i=2
    l=0
    k=int(math.sqrt(n))+1
    s=[0]*k
    while i<k:
        if s[i]==0:
            z=i
            while n%z==0:
                n//=z
                #print(z,n)
                z*=i
                l+=1
                
                
                
        for j in range(i,k,i):
            s[j]=1
        i+=1
    if n>1:
        r=0
        for i in range(2,k):
            if n%i==0:
                r=1
        if r==0:
            l+=1
    print(l)

Submission status: Wrong Answer

Solution code:
n=int(input())
import math

i=2
l=0
k=int(math.sqrt(n))+1
s=[0]*k
while i<k:
    if s[i]==0:
        z=i
        while n%z==0:
            n//=z
            #print(z,n)
            z*=i
            l+=1
            
            
            
    for j in range(i,k,i):
        s[j]=1
    i+=1
if n>1:
    r=0
    for i in range(2,k):
        if n%i==0:
            r=1
    if r==0:
        l+=1
print(l)

Submission status: Wrong Answer

Solution code:
import math

def is_prime(n):
    if n==1:
        return False
    nmax = int(math.sqrt(n)) + 1
    for i in range(2, nmax):
        if(n%i)==0:
            return False
    return True

def pf(n):
    sn = int(math.sqrt(n)) + 1
    ps = []
    for i in range(1, sn):
        if (n%i)==0:
            ps.append(i)
    del ps[0]
    if not ps:
        ps.append(n)
    return ps        

n = int(input())
ps = []
num = pf(n)
for i in num:
    if is_prime(i):
        ps.append(i)
        
zs = []        
for p in ps:
    z = p
    while(z<=n):
        zs.append(z)
        z *= p
zs.sort()

cnt = 0
for z in zs:
    if(n>1):
        if(n%z==0):
            n /= z
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

n=int(input())
x=factorization(n)
ans=0
for i in range(len(x)):
  p=x[i][1]
  j=1
  while True:
    if p>=j:
      p-=j
      ans+=1
      j+=1
    if p<j:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
b=2
cnt=0
while a>=b:
  for i in range(b,a+1):
    if a%i==0:
      cnt +=1
      a=a//i
      b=i
print(cnt)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
           temp //= i
           arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr
m=int(input())
if m==1:
  print(0)
else:
  print(len(set(factorization(m))))

Submission status: Wrong Answer

Solution code:
n=int(input())
def prime(n):
  dic={}
  f=2
  if n==1:
    return dic
  m=n
  while f*f<=m:
    r=0
    while n%f==0:
      n//=f
      r+=1
    if r>0:
      dic[f]=r
    f+=1
  if dic=={}:
    dic[n]=1
  return dic

def counter(dic):
  ans=0
  for val in dic.values():
    i=1
    while i*(i+3)/2<=val:
      i+=1
    ans+=i
  return ans

print(counter(prime(n)))

Submission status: Wrong Answer

Solution code:
n=int(input())
def prime(n):
  dic={}
  f=2
  if n==1:
    return dic
  m=n
  while f*f<=m:
    r=0
    while n%f==0:
      n//=f
      r+=1
    if r>0:
      dic[f]=r
    f+=1
  if dic=={}:
    dic[n]=1
  return dic

def counter(dic):
  ans=0
  for val in dic.values():
    i=1
    while i*(i+1)/2<=val:
      i+=1
    i-=1
    ans+=i
  return ans

print(counter(prime(n)))

Submission status: Wrong Answer

Solution code:
N = int(input())
c = 0
b = [0]*1000
p = 0
while N % 2 == 0:
  b[p] += 1
  N //= 2
if b[p]!=0:
  p += 1
i = 3
while i * i <= int(N**0.5):
  if N % i == 0:
    b[p] += 1
    N //= i
  else:
    i += 2
    if b[p]!=0:
      p += 1
if N != 1:
  b[p] += 1

for v in b:
  for i in range(1,v+1):
    if i<=v:
      c += 1
      v -= i
    else:
      break

print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
c = 0
i = 2
while N%i==0:
  c += 1
  N //= i
  i *= 2

for i in range(3,int(N**0.5)+3,2):
  if N%i==0:
    c += 1
    N //= i

if N != 1 and c==0:
  c +=1

print(c)

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest
import os

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if not arr:
        arr.append([n, 1])

    return arr


# 実装を行う関数
def resolve(test_def_name=""):
    n = int(input())

    target_s = factorization(n)

    # 素因数1だけ処理対象外。
    if sum([i[1] for i in target_s]) == 1:
        if target_s[0][0] == 1:
            print(0)
        else:
            print(1)
        return

    # 少ない物から使っていく。
    cnt = 0
    for i in range(1, 1000):

        if not any([True if j[1] >= j[0] else False for j in target_s]):
            break

        for target in target_s:
            if target[1] < i:
                continue
            target[1] -= i
            cnt += 1

    print(cnt)


# テストクラス
class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve(sys._getframe().f_back.f_code.co_name)
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """24"""
        output = """3"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """1"""
        output = """0"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """64"""
        output = """3"""
        self.assertIO(test_input, output)

    def test_input_4(self):
        test_input = """1000000007"""
        output = """1"""
        self.assertIO(test_input, output)

    def test_input_5(self):
        test_input = """997764507000"""
        output = """7"""
        self.assertIO(test_input, output)

    # 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
    def tes_t_1original_1(self):
        test_input = """データ"""
        output = """データ"""
        self.assertIO(test_input, output)


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main()

Submission status: Wrong Answer

Solution code:
import os

N = int(input())

def prime_fact(value):
    """
    素因数分解を行う関数
    Args:
        value: 素因数分解を行う値
    Returns:
        素因数分解を行った数値リスト
    """
    import math
    prime_list = {}
    prime = 2
    loop_num = 0
    while 1:
        loop_num+=1
        if math.sqrt(value)<loop_num:
            prime_list[int(value)] = 1
            break
        if value%prime==0:
            value/=prime
            if prime in prime_list.keys():
                prime_list[prime]+=1
            else:
                prime_list[prime]=1
        else:
            prime+=1
        if value == 1:
            break
    return prime_list

def sieve(max_num):
    """
    ある値までの素数を発見する関数
    Args:
        max_num: 素数の最大値
    Returns:
        ある値までの素数のリスト
    """
    droped = []
    uniqued = []
    prime_list = list(range(2, max_num+1))
    for i, current_num in enumerate(prime_list):
        if current_num in droped:
            continue
        else:
            uniqued.append(current_num)
        if i+1>=len(prime_list):
            break
        for num in prime_list[i+1:]:
            if num in droped:
                continue
            if num%current_num==0:
                droped.append(num)
    return uniqued

tmp = prime_fact(N)
result = 0
for prime, num in tmp.items():
    diff = 1
    while num>0:
        num-=diff
        if num<0:
            break
        diff+=1
        result+=1
print(result)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
MAX = int(math.sqrt(n)) + 1

a = [0]*MAX

for i in range(2, MAX):
  while n % i == 0:
    n /= i
    a[i] += 1

if n != 1:
  print("1")
else:
  ans = 0
  for i in a:
    for j in range(MAX):
      p = int(j * (j+1) / 2)
      if i < p:
        ans += j - 1
        break
  print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = N
arry = []
for i in range(2, int(n**0.5)+1):
    if n%i==0:
        j = 1
        while n%i==0:
            arry.append(i**j)
            n //= i
            j += 1
if arry==[] and n>1:
    arry.append(n)

ans = 0
for a in sorted(arry):
    if N%a==0:
        N //= a
        ans += 1
    if N==1:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def find_primes(n):
    ps = []
    t = [True] * n
    t[0] = t[1] = False
    for i in range(2, n):
        if not t[i]:
            continue
        ps.append(i)
        for j in range(i, n, i):
            t[j] = False
    return ps


def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    rn = int(n**0.5 + 1)
    ps = find_primes(rn)
    # print(ps)
    ans = 0
    f = True
    for i in ps:
        if n < i:
            break
        k = 1
        while n % (i**k) == 0:
            ans += 1
            n //= i**k
            f = False
            k += 1
    return str(ans + f)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def find_primes(n):
    ps = []
    t = [True] * n
    t[0] = t[1] = False
    for i in range(2, n):
        if not t[i]:
            continue
        ps.append(i)
        for j in range(i, n, i):
            t[j] = False
    return ps


def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    rn = int(n**0.5 + 1)
    ps = find_primes(rn)
    ans = 0
    f = True
    for i in ps:
        k = 1
        while n % (i**k) == 0:
            ans += 1
            n //= i**k
            f = False
            k += 1
    return str(ans + f)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def find_primes(n):
    ps = []
    t = [True] * n
    t[0] = t[1] = False
    for i in range(2, n):
        if not t[i]:
            continue
        ps.append(i)
        for j in range(i, n, i):
            t[j] = False
    return ps


def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    rn = int(n**0.5 + 1)
    ps = find_primes(rn)
    t = []
    for i in ps:
        k = 1
        while i**k <= rn:
            t.append(i**k)
            k += 1
    t = sorted(t)
    ans = 0
    f = True
    for i in t:
        if n % i == 0:
            ans += 1
            n //= i
            f = False
    return str(ans + f)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    ans = 0
    f = True
    for i in range(2, int(n**0.5 + 2)):
        if n % i == 0:
            ans += 1
            n //= i
            f = False
    return str(ans + f)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    if n == 1:
        return "0"
    ans = 0
    f = True
    for i in range(2, int(n**0.5 + 1)):
        if n % i == 0:
            ans += 1
            n //= i
            f = False
    return str(ans + f)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
dum = prime_factorize(int(input()))
dum_len = len(dum)

num = 0
ans = 0
cnt = 0
check = 0
for i in range(dum_len):
    if num == dum[i]:
        cnt += 1
        if cnt >= check:
            check += 1
            ans += 1
    else:
        num = dum[i]
        ans += 1
        cnt = 0
        check = 2
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
r=int(n**0.5+1)
ans=0
for i in range(2,r):
  e=0
  while n%i==0:
    n//=i
    e+=1
  k=1
  while e>k:
    e-=k
    ans+=1
    k+=1
if n!=1:
  ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
arr = factorization(N) 
cnt = 0

for key in arr:
    tmp = 1
    val = key[1]
    while val > 0:
        if val - tmp > tmp:
            val -= tmp
            tmp += 1
            cnt += 1
        else:
            val = 0
            cnt += 1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def main():
    n = int(input())
    fct = factorization(n)
    ans = 0
    for f in fct:
        for i in range(1, f[1]+1):
            n = int(n/int(f[0]**i))
            if n == 0:
                return ans
            else:
                ans += 1

    return ans


if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
from collections import defaultdict

N = int(input())
dic = defaultdict(int)

def func(N):
  if N == 1:
    return 1
  
  count = 0
  for i in range(2, N+1):
    if N % i == 0:
      N = N // i
      dic[i] += 1
      return func(N)
    if i > int(sqrt(N))+1 and count == 0:
      dic[N] = 1
      return func(1)

func(N)

def func2(k):
  n = 1
  count = 1
  while count * (count+1) // 2 <= k:
    count += 1
  return count-1

res = 0

for value in dic.values():
  if value > 0:
    res += func2(value)

print(res)

Submission status: Wrong Answer

Solution code:
from math import sqrt
from collections import defaultdict

N = int(input())
dic = defaultdict(int)

def func(N):
  if N == 1:
    return 1
  
  for i in range(2, max(int(sqrt(N))+1, 3)):
    if N % i == 0:
      N = N // i
      dic[i] += 1
      return func(N)

func(N)

def func2(k):
  n = 1
  count = 1
  while count * (count+1) // 2 <= k:
    count += 1
  return count-1

res = 0

for value in dic.values():
  if value > 0:
    res += func2(value)

print(res)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n = int(input())
F = factorization(n)
counter = 0
for a in range(len(F)):
    B = int((-1+(1+8*F[a][1])**0.5)/2)
    counter += B

print(counter)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        N = int(N/j)
        j *= i
    i += 1

if N != 1 and N != i-1:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        N = int(N/j)
        j *= i
    i += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        print(N, j)
        N = int(N/j)
        j *= i
    i += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        print(N, j)
        N = int(N/j)
        j *= i
    i += 1

if N != 1 and N != i-1:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        N /= j
        j *= i
    i += 1

if N != 1:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    j = i
    while N % j == 0:
        cnt += 1
        N /= j
        j *= i

if N != 1:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
i = 2
while i*i <= N:
    while N % i == 0:
        cnt += 1
        N /= i

if N != 1:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

N = int(input().strip())
#-----

def get_divisor(n :int) -> dict:
    divisor_dic={}
    tmp_num = n

    for i in range(2, int(n**(1/2)+1) ):
        while tmp_num % i == 0:
            divisor_dic.setdefault(i,0)
            divisor_dic[i] += 1
            
            tmp_num //= i
    
    return divisor_dic
#-----

div = get_divisor(N)

if (not div) and (N != 1):
    div[N] = 1


cnt =0

for num,pow in div.items():
    for p in range(1, pow+1):
        #if N % (num ** p) == 0:
        #    N /= (num ** p)
        #    cnt += 1
        
        if div[num] >= p:
            div[num] -= p
            cnt += 1


print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=n
cnt=0
for i in range(2,int(n**0.5)+1):
  if n%i==0:
    n=n/i
    cnt+=1
if n==m and m!=1:
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=n
cnt=0
for i in range(2,int(n**0.5)+1):
  if n%i==0:
    n=n/i
    cnt+=1
if n==m:
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
def main():
    from math import sqrt
    N = int(input())

    def prime_factorization(n):
        facts = []
        for i in range(2, int(sqrt(n)) + 5):
            while n % i == 0:
                n //= i
                facts.append(i)
        return facts

    ans = 0
    facts = sorted(set(prime_factorization(N)))
    if not facts and N != 1:
        ans += 1
    for f in facts:
        i = 1
        while N % (f**i) == 0:
            N //= f**i
            i += 1
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
Number=int(input())
#Number=997764507000

times=0

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    
    if n==1:
        return []
    else:
        return arr


Factors=factorization(Number)
print(Factors)

for i in Factors:
    Power=i[1]
    BiggerThan=0
    MinusPower=1
    
    while Power>BiggerThan:
        times+=1
        Power-=MinusPower
        MinusPower+=1
        BiggerThan+=1

print(times)

Submission status: Wrong Answer

Solution code:
Number=int(input())

times=0

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    
    if n==1:
        return []
    else:
        return arr


Factors=factorization(Number)
#print(Factors)

for i in Factors:
    times+=i[1]
print(times)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


n=int(input())
arr=factorization(n)
z=0    
for i in range(len(arr)):
    k=0
    for j in range(1,100000):
        k+=j
        z+=1
        if k+j+1>arr[i][1]:
            break

print(z)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

n = int(input())
temp = n
ans = 0
if temp == 1:
    print(0)
    sys.exit()
for i in range(2, int(-(-n**0.5 // 1)) + 1):
    if temp % i == 0:
        cnt = 0
        while temp % i == 0:
            cnt += 1
            temp //= i
        j = 1
        while np.arange(j + 2).sum() <= cnt:
            j += 1
        ans += j
if temp != 1:
    print(1)
    sys.exit()
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

n = int(input())
temp = n
ans = 0
if temp == 1:
    print("0")
    sys.exit()
for i in range(2, int(-(-n**0.5 // 1)) + 1):
    if temp % i == 0:
        cnt = 0
        while temp % i == 0:
            cnt += 1
            temp //= i
        j = 1
        while np.arange(j + 2).sum() <= cnt:
            j += 1
        ans += j
if temp != 1:
    print(1)
    sys.exit()
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n!=1:
  yaku=[n]
else:
  yaku=[]
for i in range(2,int(n**0.5)+1):
  if n%i==0:
    yaku.append(i)
    yaku.append(n//i)
yaku.sort()
N=n
count=0
for i in range(len(yaku)):
  if N%yaku[i]==0:
    count+=1
    N//=yaku[i]
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
yaku=[n]
for i in range(2,int(n**0.5)+1):
  if n%i==0:
    yaku.append(i)
    yaku.append(n//i)
yaku.sort()
N=n
count=0
for i in range(len(yaku)):
  if N%yaku[i]==0:
    count+=1
    N//=yaku[i]
print(count)

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict
N = int(input())
d = defaultdict(int)
if N == 1:
    print(0)
    sys.exit()

ls = [0 for i in range(10**7)]
cur = 2
n = N
while cur**2 <= n:
    if N%cur == 0:
        N = N//cur
        ls[cur] += 1
    if N == 1:
        break
    cur += 1
if sum(ls) == 0:
    print(1)
else:
    print(sum(ls))

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict
N = int(input())
d = defaultdict(int)
if N == 1:
    print(0)
    sys.exit()

ls = [0 for i in range(10**7)]
cur = 2
n = N
while cur**2 <= n:
    if N%cur == 0:
        N = N//cur
        ls[cur] += 1
    cur += 1
if sum(ls) == 0:
    print(1)
else:
    print(sum(ls))

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict
N = int(input())
d = defaultdict(int)
if N == 1:
    print(0)
    sys.exit()

ls = [0 for i in range(int(N**(1/2) + 3))]
for i in range(2, int(N**(1/2) + 4)):
    if N%i == 0:
        ls[i] += 1
        N = N//i
if sum(ls) == 0:
    print(1)
else:
    print(sum(ls))

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict
N = int(input())
d = defaultdict(int)
if N == 1:
    print(0)
    sys.exit()

ls = [0 for i in range(int(N**(1/2) + 3))]
for i in range(2, int(N**(1/2) + 2)):
    if N%i == 0:
        ls[i] += 1
        N = N//i
if sum(ls) == 0:
    print(1)
else:
    print(sum(ls))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(2, 100001):
    if N % i == 0:
        ans += 1
        N //= i
ans += N > 100000
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(2, 100001):
    if N % i == 0:
        ans += 1
        N //= i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(2, int(N**0.5 + 1)):
    f = 1
    while True:
        if N % i**f:
            f -= 1
            break
        f += 1
        N //= i**f
    ans += f
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
from collections import defaultdict

N = int(input())

def prime_factorize(n):
  ret = []
  for i in range(2, int(n ** (1 / 2)) + 1):
    if i > n:break
    while n % i == 0:
      n //= i
      ret.append(i)
  if n != 1:
    ret.append(n)
  return ret

dic = defaultdict(int)
lis = prime_factorize(N)
for num in lis:
    dic[num] += 1

ans = 0

for v in dic.values():
    i = 1
    while v >= i:
        v -= 1
        i += 1   
    ans += i - 1
print(ans)