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 sys
# from random import choice,randint
# from bisect import bisect_left as bl             
# from bisect import bisect_right as br  
# from collections import deque,defaultdict,Counter
from math import sqrt,floor,ceil
# from itertools import combinations,permutations
# from heapq import heapify,heappop,heappush,heappushpop
# inp=sys.stdin.readline
# out=sys.stdout.write
# flsh=sys.stdout.flush
# ranomd string generator --> a = ''.join(random.choices(string.ascii_lowercase, k = 1000))
 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod1=998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

#fact=[1]
#for i in range(1,100001):
#    fact.append((fact[-1]*i)%mod)
#ifact=[0]*100001
#ifact[100000]=pow(fact[100000],mod-2,mod)
#for i in range(100000,0,-1):
#    ifact[i-1]=(i*ifact[i])%mod
 
def MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()] #use list comprehension for loops
def LF(): return [float(x) for x in inp().strip().split()] #use try and except for dictionaries
def LS(): return inp().strip().split() #declare local variables ... for functions assing them to variables
def I(): return int(inp().strip()) # before using example ... func = len for using len() funtcion
def F(): return float(inp().strip()) #sort dictionary after zipping
def S(): return inp().strip() #use map function for mapping list to a fuction
def pf(s): return out(s+'\n')
def JA(a, sep): return sep.join(map(str, a)) #use this for string concatenation
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)
def modinv(n,p):return pow(n,p-2,p)
def ncr(n,r,p):                      
    t=((fact[n])*((ifact[r]*ifact[n-r])%p))%p
    return t

####################Actualcode################################
def isPrime2(n):
    if n==2 or n==3: return True
    if n%2==0 or n<2: return False
    for i in range(3, int(n**0.5)+1, 2):
        if n%i==0:
            return False    

    return True

def solve():
    n = I()
    if n==1:
        print(0)
    elif isPrime2(n):
        print(1)
    else:
        x = n
        c=0
        for i in range(2,int(sqrt(x))+1):
            if n%i==0:
                c+=1
                if i==n//i:
                    n=1
                else:
                    n = n//i
        # print(n)
        if isPrime2(n):
            c+=1
        print(c)
def main():
    solve()


######## Python 2 and 3 footer by Pajenegod and c1729
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192
class FastIO(BytesIO):
    newlines = 0
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s
    def read(self):
        while self._fill(): pass
        return super(FastIO,self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill(); self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s:self.buffer.write(s.encode('ascii'))
            self.read = lambda:self.buffer.read().decode('ascii')
            self.readline = lambda:self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

inp = lambda: sys.stdin.readline().rstrip('\r\n')
out = lambda x: sys.stdout.write(x)
flsh= lambda: sys.stdout.flush()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
for i in range(2,10000000):
    
    if n % i == 0:
        
        n = n//i
        c+=1
        # print(i,n)

if c == 0 and n > 1:
    print(1)
else:
    print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
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])

z = []
for i in arr:
    for j in range(1,i[1]+1):
        z.append(i[0]**j)
z = sorted(set(z))
c = 0
for i in z:
    if n%i == 0:
        c += 1
        n = int(n/i)
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
while True:
    if N >= 2:
        for j in range(2, 10**18):
            if N % j == 0:
                store = N / j
                N = store
                count += 1
                if store == 1:
                    print(count)
                    break
        break
    else:
        print(0)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
import math
from collections import defaultdict

res = 0
value = defaultdict(int)
def isprime(n):
    if n <= 1:
        return 0
    m = int(math.sqrt(n)) + 1
    for i in range(2, m):
        if n % i == 0:
            return 0
    return 1
if isprime(x):
    print(1)
else:
    def bprime(n):
        cnt = 2
        while n != 1 and cnt < int(math.sqrt(n)) + 1:
            while n % cnt == 0:
                n //= cnt
                value[cnt] += 1
            cnt += 1
    def cal(n):
        if n <= 2:
            return 1
        j = 1
        cnt = 0
        while n >= j:
            n -= j
            j += 1
            cnt += 1
        return cnt
    bprime(x)
    for key in value.keys():
        res += cal(value[key])
    print(res)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N==1:
    print(0)
else:
    sup=int(N**0.5)
    ans=0
    div2=[N]
    kari=N
    for i in range(2,sup+1):
        if N%i==0:
            div2.append(N//i)
            if kari%i==0:
                ans+=1
                kari=kari//i
    for x in div2[::-1]:
        if kari%x==0:
            ans+=1
            kari=kari//x
    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())
if n==1:
    print(0)
ans=0
t=factorization(n)
tmp=[]
for i in range(len(t)):
    if t[i][1]%2==0:

        tmp.append(t[i][0])
        ans+=t[i][1]//2
    else:
        ans+=(t[i][1]+1)//2

print(ans+len(tmp)//2)

Submission status: Wrong Answer

Solution code:
import sys
import math


def is_prime(N):
    if N == 1:
        return False
    i = 2
    while i * i <= N:
        if N % i == 0:
            return False
        i += 1
    return True

def prime(N):
    prime = []
    is_prime = [True for i in range(N+1)]  # 全て素数であると初期化
    is_prime[0] = is_prime[1] = False # 0,1は素数ではない
    for i in range(2, N+1):
        if is_prime[i]:
            # iは素数である
            prime.append(i)
            for j in range(2 * i, N+1, i):
                # iの倍数は素数でない
                is_prime[j] = False
    # N以下の素数を表示
    return prime

def main():
    N = int(input())
    if N == 1:
        print(0)
        sys.exit()
    if is_prime(N):
        print(1)
        sys.exit()
    else:
        n = math.ceil(math.sqrt(N))
        prime_list = prime(n)
        ans = []
        for i in range(len(prime_list)):
            now = prime_list[i]
            j = 1
            while now ** j <= n:
                ans.append(now ** j)
                j += 1
        ans.sort()
        count = 0
        for i in range(len(ans)):
            now = ans[i]
            if N % now == 0:
                count += 1
                N /= now
    print(count)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#import sympy

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())
ans = 1

#dic = sympy.factorint(n)
arr = factorization(n)

cnt  = 1
ans = 0
flag = False
while True:
  for k in arr:
    if k[1] >= cnt:
      k[1] -= cnt
      ans += 1
      flag = True
  if not flag:
    break
  cnt += 1
  flag = False

print(ans)

Submission status: Wrong Answer

Solution code:
#-------------------------------------------------------------------
import sys
def p(*_a):
  _s=" ".join(map(str,_a))
  #print(_s)
  sys.stderr.write(_s+"\n")
#-------------------------------------------------------------------
import math

def factorize(n):
  ret, a = [], n
  for i in range(2, int(n**0.5)+1):
    if a%i>0: continue
    c=0
    while a%i==0:
      a//=i
      c+=1
    else:
      ret.append((i,c))
  if a!=1: ret.append((a,1))
  return ret

#nの素数判定
def is_prime(n):
	if n == 1:
		return False
	for i in range(2,int(n**0.5)+1):
		if n % i == 0: return False
	return True


n = int(input())
N = factorize(n)
#p(N)

i = 2
ans=0
while n >= i:
  if is_prime(n):
    ans += 1
    break
  if n % i ==0:
    for k,_ in N:
      a = math.log(i, k)
      #p("n,i,k,a,int(a)=",n,i,k,int(a),a)
      if int(a)==a:
        n /= k
        ans += 1
        #p("ans=",ans)
        continue

  i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
num=1
count=0
num2=int(math.sqrt(n))
while n!=1:
    num+=1
    if n%num==0:
        count+=1
        n=n//num
        num2=int(math.sqrt(n))
    if num2<num:
        if count==0:
            count+=1
        elif n>num:
            count+=1
        break
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(2, 10 ** 8 + 1):
    if N // i == N / i:
        ans += 1
        N = N // i

if N > 10 ** 8:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
from copy import deepcopy
from collections import deque
from math import floor

def main():
    n = int(input())
    on = n
    def is_prime(n):
        for i in range(2, n + 1):
            if i * i > n:
                break
            if n % i == 0:
                return False
        return n != 1
    if is_prime(n):
        print(1)
        sys.exit()

    nn = floor(n**0.5)
    nn = max(6, nn)
    p = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(nn + 1)]
    p[0] = p[1] = False
    p[2] = p[3] = p[5] = True
    for i1 in range(7, floor(nn ** 0.5) + 1, 2):
        if p[i1]:
            for i2 in range(i1 ** 2, nn + 1, i1):
                p[i2] = False
        else:
            continue
    pl = [i for i, b in enumerate(p) if b == True]

    nums = deepcopy(pl)
    for pe in pl:
        cnt = 2
        while True:
            tnum = pow(pe, cnt)
            if tnum > n:
                break
            elif tnum != 0:
                if n % tnum == 0:
                    nums.append(tnum)
            cnt += 1
    nums.sort()
    numsd = deque(nums)
    ok = set()
    r = 0
    while True:
        if not numsd:
            break
        if n == 1:
            break
        nextn = numsd.popleft()
        if nextn > on or nextn > n:
            break
        elif n % nextn == 0:
            if nextn in ok:
                continue
            else:
                n = int(n / nextn)
                ok.add(nextn)
                r += 1
    print(r)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1:
  print(0)
  exit()

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

def is_prime(n):
  if n <= 1: return False
  for i in range(2, int(n**0.5)+1):
    if n%i == 0: return False
  return True

x = make_divisors(n)[1:]
if len(x)==1:
  print(n)
  exit()

cnt = 0
for a in x:
  if a == "": continue
  if is_prime(a):
    b = 1
    while n%(a**b)==0:
      n //= a**b
      x[x.index(a**b)] = ""
      cnt += 1
      b += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N=int(input())
P=2
TN=N
ans=0

while N>1 and P*P<=TN:
  if N%P==0:
    c=0
    while N%P==0:
      N=N/P
      c=c+1
    S=1
    T=2
    while c>=S:
      ans=ans+1
      S=S+T
      T=T+1
  P=P+1

if ans==0:
  ans=1

if TN==1:
  ans=0

print(ans)

Submission status: Wrong Answer

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限
# 参考URL
# https://qiita.com/LorseKudos/items/9eb560494862c8b4eb56
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
n = int(input())
temp = make_divisors(n)
count = 0
temp.remove(1)
for num in temp[:]:
    if n%num==0:
        count += 1
        n //= num
    if n < num:
        break
print(count)

Submission status: Wrong Answer

Solution code:
from collections import Counter
from itertools import combinations
import numpy as np

# 引用元
# https://note.nkmk.me/python-prime-factorization/
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

# 引用元
# https://note.nkmk.me/python-prime-factorization/
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

def get_list(counter, index):
    ans = []
    for key, val in sorted(counter.items()):
        if val > index:
            ans += [key] * index
        else:
            ans += [key] * val
    return ans

def choice_min_data(counter, min_num):
    temp = sum(counter.values())
    temp_min_num = 10**12
    co_li = None
    for index in range(1, temp+1):
        flag = False
        to_comb_list = get_list(counter, index)
        for co in combinations(to_comb_list, index):
            check_val = np.prod(co)
            if temp_min_num > check_val > min_num:
                co_li = co
                temp_min_num = check_val
                flag = True
                break

        # 最小更新せず = 終了
        if temp_min_num is not None and flag == False:
            break

    if co_li is None:
        return None, -1
    else:
        # print(co_li, temp_min_num)
        return counter - Counter(co_li), temp_min_num

def main():
    # ルール
    # 素数p, 整数e: z == p ** e
    # N / z = int(x)
    # zは被らない
    # N を N/zに置き換える
    N = int(input())

    if N <= 1:
        print(0)
        return

    counter = Counter(factorize(N))
    # print(counter)
    ans = 0
    min_num = 0
    while counter is not None:
        counter, min_num = choice_min_data(counter, min_num)
        if min_num == -1:
            break
        ans += 1
    
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
ans = 0
prime = True 
for i in range(2, int(math.sqrt(n) + 1)):
    if n % i == 0:
        n //= i
        ans += 1
        prime = False

print(0 if prime else ans)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
i=2
A=N
app=0
for i in range(2, int(N**(1/2)+1)+1):
    suma=0
    while A%i==0:
        A=A/i
        suma+=1
    if suma>0:
        n=(-1+(1+8*suma)**(1/2))/2
        n=math.floor(n)
        n=int(n)
        app=app+n
    suma=0
if app>0:
    print(app)
if app==0:
    if N>1:
        print(1)
    if N==1:
        print(0)

Submission status: Wrong Answer

Solution code:
def solve():
    n = int(input())

    p = [2]
    A = 10000
    for L in range(3, A, 2): # 2 以外の素数は奇数なので
        if all(L % L2 != 0 for L2 in p):  # すべての既存素数で割り切れなかったら素数
            p.append(L)
    z = []
    for i in p:
        for e in range(1, 10):
            if n%i**e == 0 and i**e not in z:
                n /= i**e
                z.append(i**e)
    if not z: z.append(n)
    return len(z)
    

print(solve())

Submission status: Wrong Answer

Solution code:
import math
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 sosu(n):
  for i in range(2, n):
    if n % i == 0:
      return False
    if i >= math.sqrt(n):
      break
  return True
N = int(input())
cnt = 0
insulist = factorization(N)
for i in range(len(insulist)):
  for j in range(1, insulist[i][1] + 1):
    if N % (insulist[i][0] ** j) == 0:
      N //= insulist[i][0] ** j
      cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
primelist=[2]
for i in range(3,int(math.sqrt(N))+1,2):
    if N % i == 0:
        primelist.append(i)

count = 0
for j in primelist:    
    i = j
    while N % i == 0:
        N = N / i
        i *= j
        count += 1
if count == 0 and N != 1:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
Nk=N
rootN=int(N**0.5)
p=[1]*(rootN+1)
p[0]=0
p[1]=0
for i in range(2,rootN+1):
    for j in range(i*2,rootN,i):
        p[j]=0
ps=[i for i in range(1,rootN) if p[i]==1]
pq=[]
for i in ps:
    c=0
    for j in range(1,41):
        if (N/(i**j)).is_integer():
            c+=1
            N/=(i**j)
        else:
            break
    if c!=0:
        pq.append(c)

res=0
for j in pq:
    c=0
    for k in range(1,41):
        if j-k >=0:
            c+=1
            j-=k
        else:
            break
    res+=c

if N==Nk:
    res+=1
    
print(res)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
if n == 1:
    print(0)
    sys.exit()
if n == 2:
    print(1)
    sys.exit()
tmp=n
ans=0
for i in range(2,n+1):
    if tmp % i == 0:
        tmp = tmp // i
        ans += 1
        continue
    if i > tmp:
        break
    if i > tmp // i:
        ans+=1
        break
print(ans)

Submission status: Wrong Answer

Solution code:
# Contest No.: ABC169
# Problem No.: D
# Solver:      JEMINI
# Date:        20200531

import sys
import heapq

def main():
    temp = [True] * (10 ** 6)
    temp[0] = False
    temp[1] = False
    for i in range(2, 10 ** 6):
        if temp[i]:
            cnt = 2 * i
            while cnt < 10 ** 6:
                temp[cnt] = False
                cnt += i
    prime = []
    for i in range(10 ** 6):
        if temp[i]:
            prime.append(i)

    n = int(input())
    ans = 0
    tempN = n
    for i in prime:
        if i > n:
            break
        if tempN % i:
            continue
        div = 0
        while True:
            cnt = 1
            temp = 2
            while tempN % (i ** (div + 2 * temp)) == 0:
                cnt += 1
                temp *= 2
            if tempN % (i ** (div + cnt)):
                break
            div += cnt
        tempN = tempN // (i ** div)
        #print(div)
        if div > 2:
            div = int((div * 2) ** 0.5)
        else:
            div = 1
        #print(i, div, tempN)
        ans += div
    if tempN > 1:
        ans += 1
    print(ans)
    return

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())


def Pf(n):
    k = n
    l = {}
    if n == 1:
        return 0
    else:
        i = 2
        tnp = 0
        while n > 1 and i <= int(k**0.5)+1:
            if n % i == 0:
                tnp += 1
                n //= i
            else:
                l[i] = tnp
                tnp = 0
                i += 1
        l[i] = tnp
        return l


def f(x):  # 何個取り出せるか
    if x == 0:
        return 0
    elif 1 <= x <= 2:
        return 1
    elif 3 <= x <= 5:
        return 2
    elif 6 <= x <= 9:
        return 3
    elif 10 <= x <= 14:
        return 4
    elif 15 <= x <= 20:
        return 5
    elif 21 <= x <= 27:
        return 6
    elif 28 <= x <= 35:
        return 7
    elif 36 <= x <= 44:
        return 8
    else:
        return 9

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

info = Pf(n).values()
# print(Pf(n))
# print(info)
ans = 0
for i in info:
    ans += f(i)

if ans == 0:
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a={}
temp=n
for i in range(2,int(n**0.5)+1):
    if temp % i ==0:
        count=0
        while temp % (i**(count+1)) ==0:
            count+=1
        temp= temp/(i**count)
        a[i]=count

sum=0
if len(a)==0:
  sum=1
else:
  for i in a:
      jisu= a[i]
      temp=1
      while temp*(temp+1)/2<= jisu:
              temp+=1
      sum+= temp-1
print(sum)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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 Fib(n):
    a, b = 0, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

N = int(input())
if(N == 1):
    print(0)
else:
    fact = factorization(N)
    l = [Fib(n) for n in range(3,60)]
    count = 0
    d = {}
    for i in fact:
        d[i[0]] = i[1]
    for key in d.values():
        for f in l:
            key -= f
            if(key < 0):
                break
            count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt = 0
while (n >> cnt) & 1 == 0:
    cnt += 1
res = int((-1 + (1 + 8 * cnt) ** 0.5) // 2)

n >>= cnt

temp = n
p = 3
while p * p <= n and p <= temp:
    if temp % p == 0:
        cnt = 0
        while temp % (p ** cnt) == 0:
            cnt += 1
        res += int((-1 + (1 + 8 * cnt) ** 0.5) // 2)
        temp //= p ** cnt
    p += 2

print(res + (temp >= 2))

Submission status: Wrong Answer

Solution code:
import collections

def p(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())
s = p(n)
c = collections.Counter(s)
t = list(c.values())
m = 0

for i in range(len(t)):
    for j in range (100):
        if (t[i]- 1 >= 0):
            m = m + 1
            t[i] = t[i] - 1
        else:
            break

print(m)

Submission status: Wrong Answer

Solution code:
N = int(input())
 
pn=[2];A=10000
for L in range(3,A):
    chk=True
    for L2 in pn:
        if L%L2 == 0:chk=False
    if chk==True:pn.append(L)
        
A246655 = []
for p in pn:
    pe = p
    while pe < A:
        A246655.append(pe)
        pe *= p
A246655 = sorted(A246655)
 
c=0
for i in range(len(A246655)):
    if N%A246655[i]==0:
        N = N//A246655[i]
        c+=1
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
i = 1
s = 0
ch = n
while i*i <= ch:
    i += 1
    if n%i == 0:
        count += 1
        n /= i
if ch == 1:
    print(0)
elif count == 0:
    print(1)
else:
    s = 1

if s == 1:
    n = ch
    count = 0
    i = 2
    while i <= n:
        i += 1
        if n%i == 0:
            count += 1
            n = n // i
    print(count+1)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
if n == 1:
    print(0)
    sys.exit()
if n == 2:
    print(1)
    sys.exit()
tmp=n
ans=0
for i in range(2,n):
    if tmp % i == 0:
        tmp = tmp // i
        ans += 1
        continue
    if i > tmp:
        break
    if i > tmp // i:
        ans+=1
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
import sys
N=int(input())
if(N==1):
  print(0)
  sys.exit()
div = make_divisors(N)
div.remove(1)
ans=0
for i in div:
  if(N%i==0):
    N=N/i
    ans+=1
  if(N==1):
    print(ans)
    sys.exit()
print(ans)

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
from decimal import *
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

n = int(input())

def Prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

MAX = 100010 * 3
is_prime = [False] * MAX
is_prime[0] = False
is_prime[1] = False
for i in range(2, MAX):
    if Prime(i):
        j = i * i
        is_prime[i] = True
        while j < MAX:
            is_prime[j] = True
            j *= i
if (Prime(n)):
    print("1")
else:
    ans = 0
    for i in range(2, MAX):
        if is_prime[i]:
            if n % (i) == 0:
                ans += 1
                n = n // (i)

        if n == 1:
            break

    print(ans)

Submission status: Wrong Answer

Solution code:
#nの素数判定
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
ans = 0
if n == 1:
    ans = 0
elif n == 2:
    ans = 1
elif is_prime(n):
    ans = 1
else:
    l = [i for i in range(2, 20000000)]
    for i in l:
        if n % i == 0:
            ans += 1
            n = n//i
        if n == 1:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
max_n = math.sqrt(N)
count = 0
for i in range(2, int(max_n+1)):
    if N % i == 0:
        count += 1
        N /= i
print(1 if count == 0 else count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
  print(0)
  exit(0)
import math
import numpy as np
def seachPrimeNum(N):
  max = int(np.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

primenumbers=seachPrimeNum(500000)
primenumbers.append(N)
cnts=[0] * 4
ans=0
for i in range(len(primenumbers)):
  for j in range(len(cnts)):
    cnt = j+1
    data = primenumbers[i]**cnt
    if N % data == 0:
      ans += 1
      N = N // data
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())

def div_game(n):
    zs = [int(z) for z in np.arange(2,np.sqrt(n)+1) if (n % z == 0)]
    if (zs == []):
        if (n == 1): 
            return 0
        return 1
    ns = []
    for z in zs:
        if (n % z != 0):
            continue
        n /= z
        ns.append(n)
    return len(ns)

print(div_game(n))

Submission status: Wrong Answer

Solution code:
a = int(input())

m = list()
cnt = 0
c = a
j = 0
while c > 1: 
  b = int(c**(1/2))
  for i in range(2,b+1):
    if c % i == 0 and i not in m:
      cnt += 1
      c = c // i
      m.append(i)
      break
      
  if i == b:
    if i not in m:
      cnt += 1
    c = c // c
    
if cnt == 0 and a != 1:
  cnt = 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
res = 0
p = 1

def f(N):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= N:
        if N % i == 0:
            lower_divisors.append(int(i))
            if i != N // i:
                upper_divisors.append(int(N//i))
        i += 1
    return lower_divisors + upper_divisors[::-1]

while True:
    L = f(N)
    for i in range(len(L)):
        if L[i] > p:
            p = L[i]
            N = N / p
            res += 1
            break
    else:
        print(res)
        break