TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
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

factorization(24) 
if __name__ == "__main__":
    s = int(input())
    a = factorization(s) 
    print(a)
    if a[0][0] == 1:
        print(0)
    else:
        an = 0
        for list1 in a: 
            z = 0
            check = 0
            count = list1[1]
            while True:
                z += 1
                count -= z
                if count < 0:
                    break
                check += 1
            an += check
        print(an)                



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

factorization(24) 
if __name__ == "__main__":
    s = int(input())
    a = factorization(s) 
    if a[0][0] == 1:
        print(0)
    else:
        an = 0
        for list1 in a: 
            z = 0
            check = 0
            count = list1[1]
            while True:
                z += 1
                count -= z
                if count < 0:
                    break
                check += 1
            an += check
        print(an)                



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
    n=int(input())
    from math import sqrt as S 
    pf=[]
    for i in range(2,int(S(n))+1):
        if n%i==0:
            c=0 
            while n%i==0:
                n//=i 
                c+=1 
            pf.append([i,c])
    if n>1:
        pf.append([n,1])
    cnt=0 
    def search(x):
        i=1 
        while i(i+1)//2<=x:
            i+=1 
        return i-1 
    for x in range(len(pf)):
        a=pf[x][0]
        b=pf[x][1]
        cnt+=search(b)
    print(cnt)

n=int(input())
from math import sqrt as S 
pf=[]
for i in range(2,int(S(n))+1):
    if n%i==0:
        c=0 
        while n%i==0:
            n//=i 
            c+=1 
        pf.append([i,c])
if n>1:
    pf.append([n,1])
cnt=0 
def search(x):
    i=1 
    while i*(i+1)//2<=x:
        i+=1 
    return i-1 
for x in range(len(pf)):
    a=pf[x][0]
    b=pf[x][1]
    cnt+=search(b)
print(cnt)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
ans = 0
i = 2
while(N**0.5>i):
    tmpi = i
    while(N%tmpi==0):
        ans+=1
        N/=tmpi
        tmpi*=i
    i+=1
if N != 1:
    ans = 1
print(ans)

N = int(input())
ans = 0
i = 2
N
l=2
flag=True
while(N**0.5>l):
    if N%l==0:
        flag=False
        break
    l+=1
if N ==1:
    ans = 0
elif flag:
    ans = 1
else:
    while(N**0.5>i):
        tmpi = i
        while(N%i==0):
            if N%tmpi==0:
                N/=tmpi
                tmpi*=i
                ans += 1
            else:
                N/=i
        i+=1
print(ans)

N = int(input())
ans = 0
i = 2
N
l=2
flag=True
if N ==1:
    ans = 0
else:
    while(N**0.5>i):
        tmpi = i
        while(N%i==0):
            if N%tmpi==0:
                N/=tmpi
                tmpi*=i
                ans += 1
            else:
                N/=i
        i+=1
while(N**0.5>l):
    if N%l==0:
        flag=False
        break
    l+=1
if flag and N!=1:
    ans+=1
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

# import math
#




#
#     while True:
#         p = min(candidate)


#             break

#

#

#
#
# if N == 1:
#     print(0)
#     exit()
#


# print('hoge')
#
# n = N
# c = 0
# used = {}
#
# for l in L:
#     if n % l == 0:

#         l2 = l
#         while n % l2 == 0:
#             c += 1

#             used[l2] = True
#             n = n // l2
#             l2 = l ** i
#
# if c == 0:
#     print(1)
# else:
#     if n != 1:

#         if n not in used:
#             c += 1
#     print(c)

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

ans = 0
used = {}

n = N
i = 1
p = 2
while n % p == 0:
    ans += 1
    n = n // p
    used[p] = True
    i += 1
    p = 2**i


i = 1
p = 3
k = p
while p * p <= N:
    while n % k == 0:
        if k in used:
            i += 1
            k = k ** i
        else:
            ans += 1
            i += 1
            n = n // k
            used[k] = True
            k = k ** i
    i = 1
    p += 2
    k = p

if n not in used and used != 1:
    ans += 1
print(ans)


N = int(input())

# import math
#




#
#     while True:
#         p = min(candidate)


#             break

#

#

#
#
# if N == 1:
#     print(0)
#     exit()
#


# print('hoge')
#
# n = N
# c = 0
# used = {}
#
# for l in L:
#     if n % l == 0:

#         l2 = l
#         while n % l2 == 0:
#             c += 1

#             used[l2] = True
#             n = n // l2
#             l2 = l ** i
#
# if c == 0:
#     print(1)
# else:
#     if n != 1:

#         if n not in used:
#             c += 1
#     print(c)

# if N == 1:
#     print(0)
#     exit()
#
# ans = 0
# used = {}
#
# n = N

# p = 2
# while n % p == 0:
#     ans += 1
#     n = n // p
#     used[p] = True

#     p = 2**i
#
#

# p = 3

# while p * p <= N:
#     while n % k == 0:



#         else:
#             ans += 1

#             n = n // k
#             used[k] = True


#     p += 2

#
# if n not in used and n != 1:
#     ans += 1
# print(ans)

def 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

fs = factorize(N)

from collections import Counter
c = Counter(fs)

ans = 0
i = 1
for k, v in c.items():
    k2, v2 = k,v
    while v2 >= i:
        ans += 1
        v2 -= i
        i += 1
    i = 1

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import collections
N = int(input())
def pf(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
c = collections.Counter(pf(N))
print(c)
ans = 0
for i in c.keys():
    for j in range(1,40):
        if j*(j+1)/2 <= c[i] < (j+1)*(j+2)/2:
            ans += j
print(ans)

import collections
N = int(input())
def pf(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
c = collections.Counter(pf(N))
ans = 0
for i in c.keys():
    for j in range(1,40):
        if j*(j+1)/2 <= c[i] < (j+1)*(j+2)/2:
            ans += j
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

U = 10 ** 8 + 10
is_prime = np.zeros(U, np.bool)
is_prime[2] = 1
is_prime[3::2] = 1
for p in range(3, U, 2):
    if p*p > U:
        break
    if is_prime[p]:
        is_prime[p*p::p+p] = 0

M = 10 ** 5
small_primes = np.where(is_prime[:M])[0].tolist()

N = ir()
answer = 0
used = set([1])
for p in small_primes:
    d = p
    while N%d == 0:
        answer += 1
        N //= d
        used.add(d)
        d *= p

if N > 1 and N not in used:
    answer += 1

print(answer)


# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

U = 10 ** 6 + 10
is_prime = np.zeros(U, np.bool)
is_prime[2] = 1
is_prime[3::2] = 1
for p in range(3, U, 2):
    if p*p > U:
        break
    if is_prime[p]:
        is_prime[p*p::p+p] = 0

M = 10 ** 3
small_primes = np.where(is_prime[:M])[0].tolist()

N = ir()
answer = 0
used = set()
for p in small_primes:
    d = p
    while N%d == 0:
        answer += 1
        N //= d
        used.add(d)
        d *= p

if N > 1 and N not in used:
    answer += 1

print(answer)


# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

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

N = ir()
primes = set(prime_factorize(N))
answer = 0
for p in primes:
    d = p
    while N%d == 0:
        answer += 1
        N //= d
        d *= p

print(answer)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(N):
    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)

#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
while N > 1 and div <= math.sqrt(N):
    if N%div == 0:
        N = N/div
        count = count +1
    else:
        pass
    div = div +1
if N == Nsyo and N>0:
    count = count +1
else:
    pass
print(count)

#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(Nsyo)+1:
    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 N > math.sqrt(Nsyo):
    count = count + 1
print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

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

if 1 in P:
	print(0)
else:
	ans=0
	for i in range(0,len(P)):
		if i==0:
			tmp=P[i] 
		elif P[i]==P[i-1]:
			tmp*=P[i]
		else:
			tmp=P[i]

		if n%tmp==0:
			n/=tmp
			ans+=1
		print(n)
	print(ans)

import math

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

n=int(input())
P=prime(n)
P=sorted(P)
num=n
if 1 in P:
	print(0)
else:
	ans=0
	tmp=0
	for i in range(0,len(P)):
		if i==0:
			tmp=P[i] 
		elif P[i]==P[i-1]:
			tmp*=P[i]
		else:
			tmp=P[i]
			num=n
		if num%tmp==0:
			num/=tmp
			ans+=1
			
	print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
a, b = map(str, input().split())
a = int(a)
b = float(b)

b = int(b * 100)
ans = a * b // 100

ans = int(math.floor(ans))
print(ans)

n = int(input())
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(cnt)

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

    return arr
  
lst = factorization(n)
ans = 0
if not lst:
  print(ans)
else:
  mx = max(lst)
  for _ in lst:
    for i in range(1, mx+1):
      if _ - i >= 0:
      	_ -= i
      	ans += 1
      else:
      	break
  print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import collections

N=int(input())
ans=0

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


if N==1:
	print(0)
	
else:
	lis=collections.Counter(prime_factorize(N))
	lis_=list(lis.values())
	for i in range(len(lis_)):
		for h in range(1,45):
			if lis_[i]>=h*(h+1)/2:
				ans+=1

import collections

N=int(input())
ans=0

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


if N==1:
	print(0)
	
else:
	lis=collections.Counter(prime_factorize(N))
	lis_=list(lis.values())
	for i in range(len(lis_)):
		for h in range(1,45):
			if lis_[i]>=h*(h+1)/2:
				ans+=1
	print(int(ans))
		

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

def prime(x):
    if x==1:
        prime=False
    else:
        prime=True
        for i in range(2,int(math.sqrt(x)+1)):
            if x%i==0:
                prime=False
                break
    return prime

def count_prime(N):
    if prime(N): 
        big_prime=True
        
    else:　
        big_prime=False
        rtN_init=int(math.sqrt(N)+1)
        p=[0 for n in range(int(math.sqrt(N)+1))]
        
        
        while N>1 and prime(N)==False:
            rtN=int(math.sqrt(N)+1)
            for i in range(2,rtN+1):
                if N%i==0 and prime(i):
                    p[i]+=1
                    N=N//i
                    break
        
            if prime(N) and N>rtN_init:
                big_prime=True
    return p,big_prime

def main():
    N=int(input())
    p,q=count_prime(N)
    cnt=0
    
    for n in range(len(p)):
        num=1
        while p[n]>=1:
            p[n]-=num
            if p[n]>=0:
                cnt+=1
                num+=1
    if q==True:
        cnt+=1
    print(cnt)
        
if __name__=="__main__":
    main()
    

import math

def prime(x):
    if x==1:
        prime=False
    else:
        prime=True
        for i in range(2,int(math.sqrt(x)+1)):
            if x%i==0:
                prime=False
                break
    return prime

def count_prime(N):
    p=[0 for n in range(int(math.sqrt(N)+1))]
    
    if prime(N):
        big_prime=True
        
    else:
        big_prime=False
        rtN_init=int(math.sqrt(N)+1)
        
        
        while N>1:
            
            if prime(N) and N>rtN_init:
                big_prime=True
                break
            else:
                for i in range(2,rtN_init):
                    if N%i==0 and prime(i):
                        p[i]+=1
                        N=N//i
                        break
    return p,big_prime

def main():
    N=int(input())
    p,q=count_prime(N)
    cnt=0
    
    for n in range(len(p)):
        num=1
        while p[n]>=1:
            p[n]-=num
            if p[n]>=0:
                cnt+=1
                num+=1
    if q==True:
        cnt+=1
    print(cnt)
        
if __name__=="__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
sys.setrecursionlimit(100000)


def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

from collections import defaultdict
from math import sqrt

arr = []
max_p = int(50000)
l1 = [1 for i in range(max_p)]
l2 = set()
l2.add(2)
for i in range(max_p):
    if not l1[i]:
        continue
    l2.add(2*i+3)
    for j in range(3*i+3, max_p, 2*i+3):
        l1[j] = 0

n = int(input())
dic = defaultdict(int)
for i in l2:
    while n % i == 0:
        n //= i
        dic[i] += 1
if n != 1:
    dic[n] += 1

ans = 0
for i in dic.values():
    ans += (-1 + sqrt(1 + 8 * i))//2
print(ans)


import sys
sys.setrecursionlimit(100000)


def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

from collections import defaultdict
from math import sqrt

arr = []
max_p = int(500000)
l1 = [1 for i in range(max_p)]
l2 = set()
l2.add(2)
for i in range(max_p):
    if not l1[i]:
        continue
    l2.add(2*i+3)
    for j in range(3*i+3, max_p, 2*i+3):
        l1[j] = 0

n = int(input())
#n = 10 ** 12
dic = defaultdict(int)
for i in l2:
    while n % i == 0:
        n //= i
        dic[i] += 1
if n != 1:
    dic[n] += 1

ans = 0
for i in dic.values():
    ans += (-1 + sqrt(1 + 8 * i))//2
print(int(ans))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def factorize(n):
    x = 2
    f = []
    while x**2 <= n:
        c = 0
        if n % x != 0:
            break
        else:
            while n % x == 0:
                n //= x
                c += 1
            f.append([x, c])

    if n > 1:
        f.append([n, 1])
    return f

n = int(input())
f = factorize(n)
ans = 0
for el in f:
    m = el[1]
    i = 1
    while True:
        if i*(i+1)//2 > m:
            ans += i-1
            break
        i += 1

for el in f:
    print(el)
print(ans)

def factorize(n):
    x = 2
    f = []
    while x**2 <= n:
        c = 0
        if n % x != 0:
            x += 1
            continue
        else:
            while n % x == 0:
                n //= x
                c += 1
            f.append([x, c])
        x += 1

    if n > 1:
        f.append([n, 1])
    return f

n = int(input())
f = factorize(n)
ans = 0
for el in f:
    m = el[1]
    i = 1
    while True:
        if i*(i+1)//2 > m:
            ans += i-1
            break
        i += 1

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
i = 2
ans = 0
while True:
  if i * i > n:
    break
  if n % i == 0:
    cnt = 0
    while n % i == 0:
      n /= i
      cnt += 1
    k = 1
    while cnt >= k:
      cnt -= k
      k += 1
    ans += k - 1
  i += 1
print(ans)

n = int(input())
i = 2
ans = 0
while True:
  if i * i > n:
    break
  if n % i == 0:
    cnt = 0
    while n % i == 0:
      n /= i
      cnt += 1
    k = 1
    while cnt >= k:
      cnt -= k
      k += 1
    ans += k - 1
  i += 1
if n > 1:
  ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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
ans = 0

if(N>1):
    Q = factorization(N)
    "print(Q)"
    A = [ b for [a,b] in Q]
    for a in A:
        i = 1
        while(a >= i):
            a -= i
            i += 1
            ans += 1
    print(ans)

else:
    print(0)

N = int(input())

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
ans = 0

if(N>1):
    Q = factorization(N)
    A = [ b for [a,b] in Q]
    for a in A:
        i = 1
        while(a >= i):
            a -= i
            i += 1
            ans += 1
    print(ans)

else:
    print(0)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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())
print(factorization(N))

def doit(n):
	if(n == 1):
		return 0
	c = 0
	temp = n
	for p in range(2, int(n ** 0.5) + 1):
		if temp % p == 0:
			e = 0
			while temp % p == 0:
				e += 1
				temp //= p
			c += int(0.5 * (-1 + (1 + 8 * e) ** 0.5))

	if temp == n:
		c += 1
	elif temp != 1:
		c += 1

	return c

print(doit(int(input())))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
 
from collections import Counter
 
f = Counter()
 
for i in range(2, min(int(n ** 0.5 + 1), n + 1)):
  while n % i == 0:
    f[i] += 1
    n //= i
 
    
def bsearch(test, lo, hi):
  while lo != hi:
    mid = (lo + hi + 1) // 2
    if test(mid):
      lo = mid
    else:
      hi = mid - 1
  return lo
 
ans = 0
for p, q in f.items():
  ans += bsearch(lambda w: w * (w + 1) // 2 < q, 0, 10 ** 12)
 
if ans == 0 and n > 1:
    print(1)
else:
    print(ans)


n = int(input())
 
from collections import Counter
 
f = Counter()

factors = []
for i in range(2, min(int(n ** 0.5 + 1), n + 1)):
  if n % i == 0:
      factors.append(i)
      factors.append(n // i)

factors.sort()

for factor in factors:
    while n % factor == 0:
        n //= factor
        f[factor] += 1

 
    
def bsearch(test, lo, hi):
  while lo != hi:
    mid = (lo + hi + 1) // 2
    if test(mid):
      lo = mid
    else:
      hi = mid - 1
  return lo
 
ans = 0
for p, q in f.items():
  ans += bsearch(lambda w: w * (w + 1) // 2 <= q, 0, 10 ** 12)
 
if ans == 0 and n > 1:
    print(1)
else:
    print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for p in P:
    
    temp = 1
    while p[1] > 1:
        t = p[0] ** temp
        Q.append(t)
        p[1] -= temp
        temp += 1

print(len(Q))

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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for p in P:
    
    temp = 1
    while p[1] > 1:
        t = p[0] ** temp
        Q.append(t)
        p[1] -= temp
        temp += 1

print(len(Q))

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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for i in range(len(P)):
    temp = 1
    while P[i][1] >= temp and P[i][0] != 1:
        t = P[i][0] ** temp
        Q.append(t)
        P[i][1] -= temp
        temp += 1

print(len(Q))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from statistics import median
N = int(input())
A, B = zip(*tuple(tuple(map(int, input().split())) for _ in range(N)))
print(int((median(B) - median(A)) * (1 + (not N & 1))) + 1)

from itertools import accumulate
from bisect import bisect_right
def prime_factorize_dict(n):
    d = dict()
    while not n & 1:
        d[2] = d.get(2, 0) + 1
        n >>= 1
    f = 3
    while f * f <= n:
        if not n % f:
            d[f] = d.get(f, 0) + 1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n] = d.get(n, 0) + 1
    return d

N = int(input())
l = list(prime_factorize_dict(N).values())
L = list(accumulate(range(10 ** 6)))
print(sum(bisect_right(L, item) - 1 for item in l))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
arr = []
temp = int(input())
su =0
for i in range(2, int(-(-temp**0.5//1))+1):
  if temp%i==0:
    cnt=0
    store =i
    while temp%i==0 and temp !=i :
      cnt+=1
      
      temp //= i
      arr.append(i)
      su +=1
      i *=store
     
      
if temp!=1:
  if all(temp>s for s in arr):
    arr.append(temp)
    su +=1
    
  

if arr==[] and temp !=1:
  arr.append(n)
  su =1

        

print(su)

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

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


for t in range(len(arr)):
  cnt =1
  while arr[t] -cnt>=0:
    arr[t] -=cnt
    su +=1
    cnt +=1
    
   
print(su)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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 x in t:
    
    a = 1

    for j in range (100):
        if (x - a >= 0):
            x = x - a
            m = m + 1
            a = a + 1
        else:
            break

print(m)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys, collections
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N = I()

    ans = []
    temp = N
    for i in range(2, int(N**0.5)+1):
        if temp%i == 0:
            ans.append(i)
            temp //= i
    if temp > int(N**0.5):
        ans.append(temp)

    print(ans)
    print(len(ans))

if __name__ == '__main__':
    resolve()

import sys, collections
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N = I()

    def sieve(n):
        is_prime = [True for _ in range(n+1)]
        is_prime[0] = False
        is_prime[1] = False
        for i in range(2, int(n**0.5)+1):
            if is_prime[i]:
                for j in range(i*2, n+1, i):
                    is_prime[j] = False
        return [i for i in range(n+1) if is_prime[i]]

    primes = sieve(int(N**0.5))

    ans = []
    temp = N
    for i in primes:
        j = i
        while j<int(N**0.5)+1:
            if temp%j == 0:
                ans.append(j)
                temp //= j
            j *= i
    if temp > int(N**0.5):
        ans.append(temp)

    # print(ans)
    print(len(ans))

if __name__ == '__main__':
    resolve()

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

import heapq 





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,i, cnt])

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

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

    return arr

# for N in range(1,100000):
# N = 288
# print(N)

heap = factorization(N) 
print(heap)
# print(heap)
heapq.heapify(heap)
ans = 0

while(heap):
    # print(heap)
    if N == 1:
        break
    sub,prime,cnt = heapq.heappop(heap)
    if N < sub:
        break
    if N % sub == 0:
        N = N // sub
        ans += 1
        if cnt > 0:
            cnt -= 1
            sub *= prime
            heapq.heappush(heap, [sub,prime,cnt])

    print(ans)




N = int(input())

import heapq 





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,i, cnt])

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

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

    return arr

# for N in range(1,100000):
# N = 288
# print(N)

heap = factorization(N) 
# print(heap)
# print(heap)
heapq.heapify(heap)
ans = 0

while(heap):
    # print(heap)
    if N == 1:
        break
    sub,prime,cnt = heapq.heappop(heap)
    if N < sub:
        break
    if N % sub == 0:
        N = N // sub
        ans += 1
        if cnt > 0:
            cnt -= 1
            sub *= prime
            heapq.heappush(heap, [sub,prime,cnt])

print(ans)




Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from math import floor,sqrt
N=int(input())

p = [1]*floor(sqrt(10**6))
p[0]=p[1]=0
prime=[]
for i in range(2,len(p)):
    if p[i]==0:
        continue
    prime.append(i)
    for j in range(i*2,len(p),i):
        p[j]=0

ans=0
for x in prime:
    cnt=0
    while N%x==0:
        cnt+=1
        N/=x
    ans+=floor((-1+sqrt(1+8*cnt))/2)
print(ans+int(N!=0))


from math import floor,sqrt
N=int(input())

p = [1]*floor((10**6))
p[0]=p[1]=0
prime=[]
for i in range(2,len(p)):
    if p[i]==0:
        continue
    prime.append(i)
    for j in range(i*2,len(p),i):
        p[j]=0

ans=0
for x in prime:
    if N%x!=0:
        continue
    cnt=0
    while N%x==0:
        cnt+=1
        N//=x
    ans+=floor((-1+sqrt(1+8*cnt))/2)
print(ans+int(N!=1))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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


N = int(input())
sosu = prime_factorize(N)
history = set()
count = 0
cursor = 2
while len(sosu) > 0:
    print(sosu)
    num = sosu.pop(0)
    cursor = num
    while True:
        if num not in history:
            history.add(num)
            break
        if (len(sosu) <= 0):
            break
        if (cursor != sosu[0]):
            break
        num *= sosu.pop(0)

print(len(history))


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


N = int(input())
sosu = prime_factorize(N)
history = set()
count = 0
while len(sosu) > 0:
    num = sosu.pop(0)
    cursor = num
    while True:
        if num not in history:
            history.add(num)
            break
        if (len(sosu) <= 0):
            break
        if (cursor != sosu[0]):
            break
        num *= sosu.pop(0)

print(len(history))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from collections import defaultdict
from collections import deque
from itertools import accumulate
import math
def main():
    a,b=map(float, input().split())
    print(int((a*(b*100))//100))


if __name__ == '__main__':
    main()


import math
from collections import defaultdict
def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
          n /= i
          table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table
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():
    dd = defaultdict(int)
    n = int(input())
    pri = factorization(n)
    res = 0
    i  = len(pri)-1
    ans = 0

    for i in pri:
        k = i[1]
        i=1
        tmp=2
        cnt = 0
        while i<=k:
            i+=tmp
            tmp+=1
            cnt+=1
        ans+=cnt
    if len(pri)==1 and pri[0][1]==1:
        ans=1
    if n==1:
        ans = 0
    print(ans)


if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
primes = dict()
p = 2

while p * p < n:
  if n % p == 0:
    primes[p] = 0
    while n % p == 0:
      n //= p
      primes[p] += 1
  p += 1
if p * p == n:
  primes[p] = 2
elif n >= p:
  primes[n] = 1

count = 0
for e in primes.values():
  c = 1
  while e >= c:
    e -= c
    c += 1
  count += c
  
print(count)

n = int(input())
primes = dict()
p = 2

while p * p < n:
  if n % p == 0:
    primes[p] = 0
    while n % p == 0:
      n //= p
      primes[p] += 1
  p += 1
if p * p == n:
  primes[p] = 2
elif n >= p:
  primes[n] = 1

count = 0
for e in primes.values():
  c = 1
  while c * (c + 1) // 2 <= e:
    c += 1
  count += c - 1
  
print(count)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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=one_int()

temp = factorization(N)
temp = sorted(temp, key= lambda x: x[0])

output_set = []
output = [ output_set + [t[0]]*t[1] for t in temp ]


count = 0
for i in output:
    temp = len(i)
    sums = 0
    for t in range(1,temp+1):
        sums += t
        if temp >= sums:
            count += 1

print(count)

def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

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=one_int()

temp = factorization(N)
temp = sorted(temp, key= lambda x: x[0])

# temp = [[2,9]]



output_set = []
output = [ output_set + [t[0]]*t[1] for t in temp ]

count = 0
for i in output:
    temp = len(i)
    sums = 0
    for t in range(1,temp+1):
        sums += t
        if temp >= sums:
            count += 1

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

Verdicts: Runtime Error

Accepted