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:
#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(Nsyo):
    if N%div == 0:
        while N%div == 0:
            N = N/div
            divcount = divcount+1
        divlist.append(divcount)
        divcount = 0
    else:
        pass
    div = div + 1
div = 1
divcount = 0
for i in divlist:
    while i >= div:
        i = i-div
        divcount = divcount + 1
        div = div + 1
        
    count = count +divcount
    divcount = 0
    div = 1
if divlist == [] and N >1:
    count = 1
print(count)

Submission status: Wrong Answer

Solution code:
from queue import deque
from math import log2

N = int(input())

primenum = []

for i in range(2, int(log2(N))+1):
    for n in primenum:
        if i % n == 0:
            break
    else:
        primenum.append(i)

kouho_num = set()

for n in primenum:
    for i in range(1, int(log2(N)/log2(n))+1):
        if n**i <= N:
            kouho_num.add(n**i)
        else:
            break

queue = deque([(N, 0, kouho_num)])

divnum, countnum = 0, 0
pnum = set()

res = 0

while queue:
    divnum, countnum, pnum = queue.popleft()
    if divnum == 1:
        res = max(res, countnum)
        continue
    elif divnum < 0:
        continue
    flag = 1
    for num in pnum:
        if divnum % num == 0:
            queue.append((divnum//num, countnum + 1, pnum - set([num])))
            flag = 0
    if flag:
        res = max(res, countnum+1)
print(res)

Submission status: Wrong Answer

Solution code:
#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(Nsyo):
    if N%div == 0:
        while N%div == 0:
            N = N/div
            divcount = divcount+1
        divlist.append(divcount)
        divcount = 0
    else:
        pass
    div = div + 1
div = 1
divcount = 0
for i in divlist:
    while i >= div:
        i = i-div
        divcount = divcount + 1
        div = div + 1
        
    count = count +divcount
    divcount = 0
    div = 1
if divlist == [] and N >0:
    count = 1
print(count)

Submission status: Wrong Answer

Solution code:
from queue import deque
from math import log2

N = int(input())

primenum = []

for i in range(2, int(log2(N))+1):
    for n in primenum:
        if i % n == 0:
            break
    else:
        primenum.append(i)

kouho_num = set()

for n in primenum:
    for i in range(1, int(log2(N)/log2(n))+1):
        if n**i < N:
            kouho_num.add(n**i)
        else:
            break

queue = deque([(N, 0, kouho_num)])

divnum, countnum = 0, 0
pnum = set()

res = 0

while queue:
    divnum, countnum, pnum = queue.popleft()
    if divnum == 1:
        res = max(res, countnum)
        continue
    elif divnum < 0:
        continue
    for num in pnum:
        if divnum % num == 0:
            queue.append((divnum//num, countnum + 1, pnum - set([num])))
    else:
        if divnum > 1:
            res = max(res, countnum+1)
print(res)

Submission status: Wrong Answer

Solution code:
def prime(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

N = int(input())
a = prime(N)
a.sort()
import copy
b = copy.copy(a)
b = list(set(b))
b.sort()

ret = 0
for i in b:
    cnt = 0
    idx=1
    while True:
        if a.count(i) > cnt:
            cnt = cnt + idx
            idx += 1
            ret += 1
        else:
            break

print(ret)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
count = 0
temp = True

if n == 1:
    print(0)
    exit()

for z in range(2, int(math.sqrt(n)) + 1):
    e = 1
    while n % z ** e == 0:
        n //= z ** e
        count += 1
        e += 1
        temp = False
    if n % z == 0:
        while n % z == 0:
            n //= z

if temp == True:
    print(1)
    exit()

print(count)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
count = 0
temp = True

if n == 1:
    print(0)
    exit()

for z in range(2, int(math.sqrt(n)) + 1):
    e = 1
    while n % z ** e == 0:
        n //= z ** e
        count += 1
        e += 1
        temp = False

if n != 1:
    count += 1

if temp == True:
    print(1)
    exit()

print(count)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
count = 0
temp = True

if n == 1:
    print(0)
    exit()

for z in range(2, int(math.sqrt(n)) + 1):
    e = 1
    while n % z ** e == 0:
        n //= z ** e
        count += 1
        e += 1
        temp = False

if temp == True:
    print(1)
    exit()

print(count)

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter



def prime_factorization(num):
    """
    素因数分解
    ;param num 素因数分解したい数字
    ;return result {素因数: 回数, ・・・}
    """

    result = dict()

    x = 2
    while x < int(math.sqrt(num)):
        if num % x == 0:
            count = 0
            while num % x == 0:
                count += 1
                num = num / x

            result[x] = count

        x += 1

    if num != 1:
       result[num] = 1

    return result


N = int(input())

# 素因数分解
result = prime_factorization(N)

# 操作の回数を求める
ans = 0
for value in result.values():
    c = 1
    while value != 0:
        ans += 1
        value -= c
        c += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
count = 0
h = math.isqrt(n)
for x in range(2,h+1):
  if n==1:
    break
  p = 1
  while n>1 and n%(x**p)==0:
    n //= (x**p)
    count += 1
    p += 1

if count:
  print(count)
else :
  if n==1:
    print(0)
  else :
  	print(1)

Submission status: Wrong Answer

Solution code:
n = int(input())
# print('n',n)

# 素数と個数を求める
def factorize(n):
    res = []
    for i in range(2,n):
        if i*i > n: break
        if n%i: continue
        res += [[i,0]]
        while n%i == 0:
            n //= i
            res[-1][1] += 1
    if n != 1: res += [[n,1]]
    return res

P = factorize(n)
# print(P)

# 約数列挙 ペア出力
def divisors_pair(n):
    res = []
    for i in range(1,n):
        if i*i > n: break
        if n%i == 0:
            res += [[i, n//i]]
    return res

ans = 0
for pc in P:
    x = pc[0]**pc[1]
    D = divisors_pair(x)
    # print('pc',pc,'x',x,'D',D)
    ans += len(D)
    for d in D:
        if d[0] == d[1]: ans -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
t = 0
p = N
tmp = int(math.sqrt(N)) + 1
for num in range(2,tmp):
    d = 1
    while N % num**d ==0:
        N //= num**d
        t += 1
        d += 1
    if(N % num == 0):
        print(N)
        N //= num
if (N != 1):
    t+=1
if(t==0 and p != 1):
    t = 1
print(t)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
t = 0
p = N
for num in range(2,int(math.sqrt(N))+1):
    d = 1
    while N % num**d ==0:
        N //= num**d
        t += 1
        d += 1
    if(N % num == 0):
        print(N)
        N //= num
if (N != 1):
    t+=1
if(t==0 and p != 1):
    t = 1
print(t)

Submission status: Wrong Answer

Solution code:
import math


def prime_factorization(n):
    result = []
    
    N = n
    x = 2
    while x <= math.sqrt(N):
        if n % x == 0:
            result.append(x)
            n = n / x

        x += 1
        
    if n % N == 0:
       result.append(N)   

    return result



N = int(input())

result = prime_factorization(N)

print(len(result))

Submission status: Wrong Answer

Solution code:
n = int(input())


def solve(n):
    res = 0
    for d in range(2, n):
        if d * d > n:
            break

        degree = 0
        while n % d == 0:
            n /= d
            degree += 1

        i = 1
        while degree >= i:
            degree -= i
            i += 1
            res += 1

    return res if n == 1 else 1


print(solve(n))

Submission status: Wrong Answer

Solution code:
import math


def prime_factorization(n):
    result = []
    
    N = n
    x = 2
    while x <= math.sqrt(N):
        if n % x == 0:
            result.append(x)
            n = n / x

        x += 1

    return result



N = int(input())

result = prime_factorization(N)

print(len(result))

Submission status: Wrong Answer

Solution code:
n=int(input())
p=1
while p<1e6:
 c=t=0;p+=1
 while n%p<1:n/=p;x=c==t;t+=x;c+=1-t*x
print(t+1-(n<2))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

from functools import reduce

import math


from collections import defaultdict
from math import sqrt

def prime_factors(n):
    primes = defaultdict(int)
    i = 2
    mx = sqrt(n)
    while n != 1:
        if n % i == 0:
            n = n // i
            primes[i] += 1
        elif i > mx:
            if len(primes) == 0:
                primes[i] += 1
            break
        else:
            i += 1
    return primes

def solve_n(x):
    return (-1 + sqrt(1 + 4 * 2* x)) / 2

def solve(N: int):
    fs = prime_factors(N)
    count = 0
    for key, value in fs.items():
        count += math.floor(solve_n(value))

    print(count)
    return



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
t = 0
p = N
for num in range(2,int(math.sqrt(N))+1):
    d = 1
    while N % num**d ==0:
        N //= num**d
        t += 1
        d += 1
    if(N % num == 0):
        N //= num
if(t==0 and p != 1):
    t = 1
print(t)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
import sys
input = sys.stdin.readline

def prime_list(limit, until_limit=True):
    lst = [2]
    for num in range(3, limit, 2):
        if num ** 2 > limit and not until_limit:
            break

        for p_num in lst:
            if num % p_num == 0:
                break
            elif p_num * p_num > num:
                lst.append(num)
                break
    return lst


def prime_factor_count():
    pass


def main():
    n = int(input())
    p_list = prime_list(n, False)

    d = defaultdict(int)

    tmp = n
    for i in p_list:
        while 1:
            if tmp % i != 0:
                break
            else:
                tmp //= i
                d[i] += 1
        if tmp == 0:
            break

    cnt = 0
    tmp_n = 0
    for k, v in d.items():
        exp_cnt = 1
        while 1:
            if exp_cnt > v:
                break
            else:
                if tmp_n % (tmp_exp := k ** exp_cnt) == 0:
                    tmp_n //= tmp_exp
                    cnt += 1
                    v -= exp_cnt
                    exp_cnt += 1
    else:
        if n == tmp_n:
            cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

from functools import reduce

import math


from collections import defaultdict
from math import sqrt

def prime_factors(n):
    primes = defaultdict(int)
    i = 2
    mx = sqrt(n)
    while n != 1:
        if n % i == 0:
            n = n // i
            primes[i] += 1
        if i >= mx:
            if len(primes) == 0:
                primes[i] += 1
            break
        else:
            i += 1
    return primes

def solve_n(x):
    return (-1 + sqrt(1 + 4 * 2* x)) / 2

def solve(N: int):
    fs = prime_factors(N)
    count = 0
    for key, value in fs.items():
        count += math.floor(solve_n(value))

    print(count)
    return



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def factorize(n):
    """
    素因数はたかだか n**0.5 以下
    :return: e.g. factorize(24) -> {2: 3, 3: 1} (24 = 2**3 * 3**1)
    """
    res = {}
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            res[i] = 0
            while temp % i ==0:
                res[i] += 1
                temp //= i

    if temp != 1:
        res[temp] = 1

    if len(res) == 0:
        res[n] = 1

    return res

def factorize_exp(n):
    """
    Return only exponents of factorization.
    :return: e.g. factorize(24) -> [3, 1] (24 = 2**3 * 3**1)
    """
    res = []
    temp = n

    if n == 1:
        # 1 は素数ではない
        return res

    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
            res.append(cnt)
    if temp != 1:
        res.append(1)

    if len(res) == 0:
        res.append(1)

    return res


n = int(input())
factors = factorize_exp(n)
cnt = 0
print(factors)

for i in factors:
    rem = i
    j = 1
    while rem >= j:
        rem -= j
        cnt += 1
        j += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
def factorize(n):
    """
    素因数はたかだか n**0.5 以下
    :return: e.g. factorize(24) -> {2: 3, 3: 1} (24 = 2**3 * 3**1)
    """
    res = {}
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            res[i] = 0
            while temp % i ==0:
                res[i] += 1
                temp //= i

    if temp != 1:
        res[temp] = 1

    if len(res) == 0:
        res[n] = 1

    return res

def factorize_exp(n):
    """
    Return only exponents of factorization.
    :return: e.g. factorize(24) -> [3, 1] (24 = 2**3 * 3**1)
    """
    res = []
    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
            res.append(cnt)
    if temp != 1:
        res.append(1)

    if len(res) == 0:
        res.append(1)

    return res


n = int(input())
factors = factorize_exp(n)
cnt = 0

for i in factors:
    rem = i
    j = 1
    while rem >= j:
        rem -= j
        cnt += 1
        j += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

from functools import reduce

import math


from collections import defaultdict
from math import sqrt

def prime_factors(n):
    primes = defaultdict(int)
    i = 2
    while n != 1:
        if n % i == 0:
            n = n // i
            primes[i] += 1
        if i > sqrt(n) and len(primes)==0:
            primes[i] += 1
            break
        else:
            i += 1
    return primes

def solve_n(x):
    return (-1 + sqrt(1 + 4 * 2* x)) / 2

def solve(N: int):
    fs = prime_factors(N)
    count = 0
    for key, value in fs.items():
        count += math.floor(solve_n(value))

    print(count)
    return



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#문제를 풀때 너무 조급하기도 해서 행간을 읽지 못했다.
#TIME : 
import sys
from math import sqrt
input = sys.stdin.readline

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

n = inp()

def factoriation(n):
    arr = []
    temp = n
    for i in range(2,int(sqrt(n))+1):
        if temp%i == 0:
            cnt = 0
            while temp%i == 0:
                cnt+=1
                temp //= i
            arr.append([i,cnt])
    if arr==[]:
        arr.append([n,1])
    return arr

fact = factoriation(n)
res = 0
if n==1:
    print(0)
    exit()
for i in range(len(fact)):
    for j in range(1,fact[i][1]+1):
        if n%(fact[i][0]**j) == 0:
            res+=1
            n = n/(fact[i][0]**j)
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())

a=factorization(n)
f=0
for z in a:
  p=z[0]
  e=z[1]
  i=1
  while e>0:
    e=e-i
    i=i+1
    f=f+1
print(f)

Submission status: Wrong Answer

Solution code:

n = int(input())

import math

# input->3以上の奇数のみ
def first_div(n):
    for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return i
    return n

def next_div(start, stop):
    for i in range(start, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return i
    return n   

if n == 1:
    print(0)
    exit()


ans = 0
currentBase = 2
while n > 1:
    if n % currentBase == 0:
        currentDiv = currentBase
        while True:
            ans += 1
            n = n//currentDiv
            currentDiv = currentDiv * currentBase
            if n%currentDiv != 0 or n <= 1:
                break
    if currentBase == 2:
        currentBase = 3
    else:
        if currentBase >= n:
            break
        else:
            currentBase = next_div(currentBase+2, n)


print(ans)

Submission status: Wrong Answer

Solution code:

n = int(input())

import math


def is_prime(n):
    if n <= 1:
        return False

    if n == 2:
        return True

    if n % 2 == 0:
        return False

    for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return False

    return True
# input->3以上の奇数のみ
def first_div(n):
    for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return i
    return n

def next_div(start, stop):
    for i in range(start, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return i
    return n   

if n == 1:
    print(0)
    exit()


ans = 0
currentDiv = 1
while n > 1:
    if n % 2 == 0:
        divEven = 2
        while True:
            ans += 1
            n = n//divEven
            #print('even', ans, divEven, n)
            divEven = divEven * 2
            if n%divEven != 0 or n <= 1:
                break

    else:
        divBase = next_div(currentDiv+2, n)
        if divBase == currentDiv:
            n = 1
            break
        currentDiv = divBase
        divOdd = divBase
        while True:
            ans += 1
            n = n//divOdd
            # print('odd', ans, divOdd, divBase, n)
            divOdd = divOdd * divBase
            if n%divOdd != 0 or n <= 1:
                break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

def fact(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 makelist(arr):#zのリストを作成
    lst = []
    for i in arr:
        a = i[0] #素数
        b = i[1] #個数
        
        if b == 1:
            lst.append(a)
        else:
            temp = 1
            while temp <= b:
                lst.append(a**temp)
                b -= 1
                temp += 1
    lst = sorted(lst) #昇順に並び替え
    return lst

n = int(input())

if n == 1:
    print(0)
    sys.exit()

l = fact(n)
z = makelist(l)
ans = 0
for i in z:
    n //= i
    if n == 0:
        break
    elif n == 1:
        ans += 1
        break
    else:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def fact(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 makelist(arr):#zのリストを作成
    lst = []
    for i in arr:
        a = i[0] #素数
        b = i[1] #個数
        
        if b == 1:
            lst.append(a)
        else:
            temp = 1
            while temp <= b:
                lst.append(a**temp)
                b -= 1
                temp += 1
    lst = sorted(lst) #昇順に並び替え
    return lst

n = int(input())
l = fact(n)
#print(l)
#print(makelist(l))
z = makelist(l)
ans = 0
for i in z:
    n //= i
    if n == 0:
        break
    elif n == 1:
        ans += 1
        break
    else:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def solution(x):
    i = 2
    cnt = 0
    n = x
    while (i*i <= n and i <= x):
        if x % i == 0:
            cnt += 1
            x //= i
        i += 1
        
    if x == 1:
        return 0
    elif cnt == 0:
        return 1
    return cnt

a = int(input())
print(solution(a))

Submission status: Wrong Answer

Solution code:

n = int(input())

import math
def is_prime(n):
    if n <= 1:
        return False

    if n == 2:
        return True

    if n % 2 == 0:
        return False

    for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return False

    return True
# input->3以上の奇数のみ
def first_div(n):
    for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return i
    return n

if n == 1:
    print(0)
    exit()


ans = 0
while n > 1:
    if n % 2 == 0:
        divEven = 2
        while True:
            ans += 1
            n = n//divEven
            #print('even', ans, divEven, n)
            divEven = divEven * 2
            if n%divEven != 0 or n <= 1:
                break

    else:
        fd = first_div(n)
        if n == fd**2:
            ans += 1
            n = n // (fd**2)
            break
        divOdd = fd
        while True:
            ans += 1
            n = n//divOdd
            #print('odd', ans, divOdd, fd, n)
            divOdd = divOdd * fd
            if n%divOdd != 0 or n <= 1:
                break

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
count = 0
count_2 = 0
sq = 1

while N % 2 == 0:
    N = N//2
    count_2 += 1

while count_2 > 0:
    count += 1
    count_2 -= sq
    sq += 1
    if count_2 < 0:
        count -= 1
F_N = N
a = int(np.sqrt(N))

for i in range(a+1):
    if i == 0:
        continue
    elif N < i:
        break
    elif N % (2 * i + 1) == 0:
        N = N//(2 * i + 1)
        count += 1 

if N == F_N:
    count += 1

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
i = 2
while i<=10**6:
    
  if n % i == 0:
    ans+=1
    n //= i

  i += 1
if ans == 0 and n > 1:
  ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict

def main():
    N = int(input())
    fac = defaultdict(int)

    for i in range(2, int(math.sqrt(N))+1):
        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

        if i == int(math.sqrt(N)) and N != 1:
            fac[N] += 1

    ans = 0
    for k, v in fac.items():
        e = 1
        for i in range(10000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict

def main():
    N = int(input())
    fac = defaultdict(int)

    for i in range(2, int(math.sqrt(N))+1):
        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

        if i == int(math.sqrt(N)) and N != 1:
            fac[N] += 1

    ans = 0
    for k, v in fac.items():
        print(k, v)
        e = 1
        for i in range(10000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
if n > 1:
  ans = 1
else:
  ans = 0
i = 2
while i<=10**6:
    
  if n % i == 0:
    ans+=1
    n //= i

  i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n > 1:
  ans = 1
else:
  ans = 0
i = 2
while True:
  if i >= n**0.5:
    break
    
  if n % i == 0:
    ans+=1
    n //= i

  i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def check_sosu(n):
    if n < 2:
        return 0
    j = 2
    while j * j <= n:
        if n % j == 0:
            return 0
        j += 1
    return 1

n = int(input())


sosu = [1 for _ in range(10**6+5)]
sosu[0] = 0
sosu[1] = 0
for i in range(2, len(sosu)):
    if sosu[i]:
        j = i+i
        while j < len(sosu):
            sosu[j] = 0
            j += i

z_list = []
z_set = set()
for i in range(2, len(sosu)):
    if sosu[i]:
        j = i
        while j <= n:
            if not j in z_set:
                z_list.append(j)
                z_set.add(j)
            j *= i



o_n = n
cnt = 0

for i in z_list:
    if n % i == 0:
        cnt += 1
        n //= i

if n >= 10**6+5:
    tmp = check_sosu(n)
    cnt += tmp

print(cnt)

Submission status: Wrong Answer

Solution code:
from math import sqrt
n=int(input())
rn=int(sqrt(n))
s=[0]*(rn+1)
s[0]=-1
s[1]=-1
t=[0]*(rn+1)
for i in range(2,rn+1):
    if s[i] != 0:
        continue
    s[i] = i
    j = i
    while j < rn + 1:
        t[j] = 1
        j *= i
    for j in range(i * i, rn + 1,i):
        if s[j] == 0:
            s[j] == i

result = 0
last = -1
for i in range(2,rn+1):
    if t[i] == 0:
        continue
    if n % i == 0:
        result += 1
        n //= i
        last =i
if n != 1 and n > rn:
    result += 1
print(result)

Submission status: Wrong Answer

Solution code:
import math
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(math.sqrt(n))+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())
factors = factorization(n)
res = 0
for _,cnt in factors:
  i = 1
  while cnt >= i:
    cnt -= i
    i += 1
    res += 1

print(res)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import math

def div(n):
    if n == 1:
        return []
    prime = []
    tmp = int(math.sqrt(n)) + 1
    
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            prime.append(num)
    
    if len(prime) == 0:
        return [1]
    else:
        return prime

n = int(input())
prime_div = Counter(div(n))
ans = 0

for p, ex in prime_div.items():
    k = 1
    while ex >= k:
        ex -= k
        ans += 1
        k += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict

def main():
    N = int(input())
    fac = defaultdict(int)

    is_p = True

    for i in range(2, int(math.sqrt(N))):

        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

        if i == int(math.sqrt(N)-1):
            if is_p:
                fac[N] += 1

    ans = 0
    for k, v in fac.items():

        e = 1
        for i in range(1000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict

def main():
    N = int(input())
    fac = defaultdict(int)

    is_p = True

    for i in range(2, int(math.sqrt(N))+1):
        
        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

        if i == int(math.sqrt(N)):
            if is_p:
                fac[N] += 1

    ans = 0
    for k, v in fac.items():

        e = 1
        for i in range(1000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
if n > 1:
  ans = 1
else:
  ans = 0
i = 2
while True:
  if (i)*(i) >= n:
    break
    
  if n % i == 0:
    ans+=1
    n //= i

  i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def f(exponent):
	#reurns how many times a prime raised to exponent can be used
	step = 1
	cumul = 0
	count = 0
	while( cumul <= exponent):
		cumul += step
		count +=1
		step +=1
	return count - (1 if cumul > exponent else 0)

def answer(n):
	if n == 1: return 0
	res = 0
	on = n
	for d in range(2, int(on ** 0.5) + 2):
		if n % d == 0:
			e = 0
			while(n%d == 0): 
				e +=1
				n/=d
			res+= f(e)
		
	return res if n == 1 else 1

print answer(int(raw_input()))