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 sympy
N = int(input())
p_list = list(sympy.primerange(2,1000000))
print(p_list)
cnt = 0
for i in range(10000):
    j = 1
    while N % (p_list[i] ** j) == 0:
        cnt += 1
        N = N / (p_list[i] ** j)
        j += 1
    a = sympy.isprime(N)
    if a == True:
        cnt += 1
        break
print(cnt)

def sieve(n):
    is_prime = [True for _ in range(n+1)]
    is_prime[0] = False

    for i in range(2, n+1):
        if is_prime[i-1]:
            j = 2 * i
            while j <= n:
                is_prime[j-1] = False
                j += i
    table = [ i for i in range(1, n+1) if is_prime[i-1]]
    return table

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

N = int(input())
p_list = sieve(10000000)
cnt = 0
for i in range(100000):
    for j in range(1,100):
        q, mod = divmod(N, (p_list[i] ** j))
        if mod == 0:
            cnt += 1
            N = q
        else:
            break
    if N > 104743:
        a = is_prime(N)
        if a == True:
            cnt += 1
            break
print(cnt)


import collections

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

N = int(input())
if N == 1:
    print(0)
else:
    A = prime_decomposition(N)

    c = collections.Counter(A)
    values, counts = zip(*c.most_common())


    cnt = 0
    for i in range(len(counts)):
        for j in range(10,0,-1):
            if counts[i] >= j * (j + 1)//2:
                cnt += j
                break
    print(cnt)

Verdicts: Runtime Error

Time Limit Exceeded

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

d = 2
while d * d < n:
    if n % d != 0:
        d += 1
        continue

    e = d
    while n % e == 0:
        print(n, e)
        n //= e
        e *= d
        ans += 1

if n != 1:
    ans += 1

print(ans)

n = int(input())
ans = 0

d = 2
while d * d <= n:
    if n % d != 0:
        d += 1
        continue

    e = d
    while n % e == 0:
        n //= e
        e *= d
        ans += 1

    while n % d == 0:
        n //= d
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):
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))

n=int(input())
a=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;a+=x
print(a-(n<2))

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

primes = prime_factorize(N)


num = 0
hist = []
c = primes[0]
for p in primes:
    if c not in hist:
        hist.append(c)
        num += 1
        c = 1
    c *= p

print(num)


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

primes = prime_factorize(N)

num = 0
hist = [1]
c = 1

tmp = 1
for p in primes:
    
    if tmp != p:
        c = 1
    tmp = p
    c *= p
    if c not in hist:
        hist.append(c)
        num += 1
        c = 1
print(num)


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):
pf={}
m=int(input())
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
print(pf)

cnt = 0
a = []
a.append(0)
for i in range(1,30000):
    a.append(i + a[i-1])
#print(a)
for i in pf:
    s = pf[i]
    c = s
    if c in a:
        cnt += a.index(c)
    else:
        cnt += 1
    #print(c)
print(cnt)



pf={}
m=int(input())
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
print(pf)

cnt = 0
a = []
a.append(0)
for i in range(1,30000):
    a.append(i + a[i-1])
#print(a)
for i in pf:
    s = pf[i]
    c = s
    if c in a:
        cnt += a.index(c)
    else:
        cnt += 1
    #print(c)
print(cnt)



from math import sqrt
pf={}
m=int(input())
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
#print(pf)

cnt = 0
calc = lambda n: (sqrt(8 * n + 1) - 1) // 2
for i in pf:
    v = pf[i]
    n = 1
    while v >= n:
        v -= n
        cnt += 1
        n += 1
#    cnt += calc(pf[i])
print(int(cnt))


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):
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]

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) 

import sys
N=int(input())
if(N==1):
  print(0)
  sys.exit()
div = make_divisors(N)
div.remove(1)
new_div=[]
for k in div:
  jud=factorization(k) 
  if(len(jud)==1):
    new_div.append(k)
ans=0
print(new_div)
for i in new_div:
  if(N%i==0):
    N=N/i
    ans+=1
  if(N==1):
    print(ans)
    sys.exit()
print(ans)

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]

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) 

import sys
N=int(input())
if(N==1):
  print(0)
  sys.exit()
div = make_divisors(N)
div.remove(1)
new_div=[]
for k in div:
  jud=factorization(k) 
  if(len(jud)==1):
    new_div.append(k)
ans=0

for i in new_div:
  if(N%i==0):
    N=N/i
    ans+=1
  if(N==1):
    print(ans)
    sys.exit()
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(y):
    arr = []
    temp = y
    for i in range(2, int(-(-y**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([y, 1])
    return arr
n=int(input())
if n==1:
  print(0)
  exit()
ans=0
l=factorization(n)
for i,j in l:
    if j<=2:
      ans+=1
    else:
      t=1
      while j:
        print(j,t)
        if j<t:
          break
        ans+=1
        j-=t
        t+=1           
print(ans)

def factorization(y):
    arr = []
    temp = y
    for i in range(2, int(-(-y**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([y, 1])
    return arr
n=int(input())
if n==1:
  print(0)
  exit()
ans=0
l=factorization(n)
for i,j in l:
    if j<=2:
      ans+=1
    else:
      t=1
      while j:
        if j<t:
          break
        ans+=1
        j-=t
        t+=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 sys
input = sys.stdin.readline



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


def main():
    N = int(input().strip())
    if N == 1:
        return 0
    factors = factorization(N)
    ans = 0
    for factor in factors:
        counter = 1
        while True:
            if factor[1] >= counter:
                factor[1] -= counter
                counter += 1
                ans += 1
            else:
                break
    return ans

import sys
input = sys.stdin.readline



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


def main():
    N = int(input().strip())
    if N == 1:
        return 0
    factors = factorization(N)
    ans = 0
    for factor in factors:
        counter = 1
        while True:
            if factor[1] >= counter:
                selected.add(factor[0]**counter)
                factor[1] -= counter
                counter += 1
                ans += 1
            else:
                break
    return ans


if __name__ == "__main__":
    print(main())


import sys
input = sys.stdin.readline



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


def main():
    N = int(input().strip())
    if N == 1:
        return 0
    factors = factorization(N)
    ans = 0
    for factor in factors:
        counter = 1
        while True:
            if factor[1] >= counter:
                factor[1] -= counter
                counter += 1
                ans += 1
            else:
                break
    return ans


if __name__ == "__main__":
    print(main())

Verdicts: Wrong Answer

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())
if n == 1:
    print(0)
    exit()

def factorization(num):
    arr = []
    temp = num
    for i in range(2, int(num**0.5)+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([num, 1])

    return arr

x = factorization(n)
ans = 0
print(x)
for i in range(len(x)):
  x[i][1] -= 1
  ans += 1
  y = 2
  while x[i][1] > 0:
    x[i][1] -= y
    if x[i][1] >= 0:
      ans += 1
    y += 1
 
print(ans)

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

def factorization(num):
    arr = []
    temp = num
    for i in range(2, int(num**0.5)+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([num, 1])

    return arr

x = factorization(n)
ans = 0
for i in range(len(x)):
  x[i][1] -= 1
  ans += 1
  y = 2
  while x[i][1] > 0:
    x[i][1] -= y
    if x[i][1] >= 0:
      ans += 1
    y += 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())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors
f = list(set(prime_factors(n)))
print(f)
ans = 0
for i in f:
    e = 1
    while n % i**e == 0:
        n = n//(i**e)
        ans += 1
        e+=1

print(ans)  

n = int(input())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors
f = list(set(prime_factors(n)))
f = f+list(map(lambda x: x**2,f))+list(map(lambda x: x**3,f))
f.sort()
print(f)
ans = 0
for i in f:
    if n % i == 0:
        n = n//i
        ans += 1

print(ans)  

n = int(input())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors

f = list(set(prime_factors(n)))
ans = 0
for i in f:
    e = 1
    while n % i**e == 0:
        n = n//(i**e)
        ans += 1
        e+=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):
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 a == 1:
  print(0)
  exit()
a = factorization(N)
cnt = 0
for i in a:
  temp = i[1]-1
  d = 2
  while temp>=d:
    temp -= d
    d += 1
  cnt+=d-1
print(cnt)
  
  
  
  
  
  

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)
  exit()
a = factorization(N)
cnt = 0
for i in a:
  temp = i[1]-1
  d = 2
  while temp>=d:
    temp -= d
    d += 1
  cnt+=d-1
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):
from sys import *
from collections import Counter
N = int(stdin.readline())
things = []
if N ==1:
    print(0)
    exit()
for i in range(2,N):
    if i*i > N:
        if len(things) == 0:
            print(1)
            exit()
        break
    while(N%i == 0):
        things.append(i)
        N = N/i

c = Counter(things)
vals = 0
for item in c:
    hue = 0
    for i in range(1,100000):
        if (hue + i) > c[item]:
            break
        else:
            hue += i
            vals += 1
print(vals)


from sys import *
from collections import Counter
N = int(stdin.readline())
things = []
if N ==1:
    print(0)
    exit()
for i in range(2,N):
    if i*i > N:
        if len(things) == 0:
            print(1)
            exit()
        if N > 1:
            things.append(int(N))
        break
    while(N%i == 0):
        things.append(i)
        N = N/i
c = Counter(things)
vals = 0
for item in c:
    hue = 0
    for i in range(1,100000):
        if (hue + i) > c[item]:
            break
        else:
            hue += i
            vals += 1

print(vals)


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
from collections import defaultdict


N = int(input())
n = N

factor = defaultdict(lambda: 0)
tmp = int(math.sqrt(N))+1
for num in range(2,tmp):
    while N % num == 0:
        N //= num
        factor[num] += 1
if not factor:
    factor[n] += 1
elif N != 1:
    factor[N] += 1

print(factor)

ans = 0
for num in factor:
    i = 1
    while True:
        factor[num] -= i
        if factor[num]<0:
            break
        ans += 1
        i+=1

print(ans)


import math
from collections import defaultdict


N = int(input())
n = N

factor = defaultdict(lambda: 0)
tmp = int(math.sqrt(N))+1
for num in range(2,tmp):
    while N % num == 0:
        N //= num
        factor[num] += 1
if not factor:
    factor[n] += 1
else:
    factor[N] += 1



ans = 0
for num in factor:
    i = 1
    while True:
        factor[num] -= i
        if factor[num]<0:
            break
        ans += 1
        i+=1

print(ans)


import math
from collections import defaultdict


N = int(input())
n = N

factor = defaultdict(lambda: 0)
tmp = int(math.sqrt(N))+1
for num in range(2,tmp):
    while N % num == 0:
        N //= num
        factor[num] += 1
if not factor and n!=1:
    factor[n] += 1
elif N != 1:
    factor[N] += 1



ans = 0
for num in factor:
    i = 1
    while True:
        factor[num] -= i
        if factor[num]<0:
            break
        ans += 1
        i+=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):
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())
ans = prime_factorize(N)
print(len(ans))

def factorization(n):
    ans = 0
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            tmp = set()
            while temp%i==0:
                cnt+=1
                temp //= i
                if not cnt in tmp:
                    tmp.add(cnt)
                    cnt = 0
                    ans += 1

    if temp!=1:
        ans += 1

    if ans==0 and temp!=1:
        ans += 1

    return ans

N = int(input())
print(factorization(N))

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())
limit = n**0.5
q = 2

if n == 1:
    print(0)
else:
    ans = 0
    while q < limit:
        cnt = 0
        while n % q == 0:
            cnt += 1
            n /= q
        if cnt > 0:
            ans += int((2*cnt + 0.25)**0.5 + 1.5 - 10**(-100))
            limit = n**0.5
        q += 1
    print(ans)


n = int(input())
limit = n**0.5
q = 2

if n == 1:
    print(0)
else:
    ans = 0
    while q < limit:
        cnt = 0
        while n % q == 0:
            cnt += 1
            n /= q
        if cnt > 0:
            ans += int((2*cnt + 0.25)**0.5 - 0.5)
            limit = n**0.5
        q += 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):
a,b=list(map(float,input().split()))
c=a*(b*100)
d=int(c//100)
print(d)

import collections
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())
c= collections.Counter(prime_factorize(n))

sum=0
for i in c:
    n=1
    while n*(n+1)/2<=c[i]:
        n=n+1
    sum=sum+n-1
print(sum)
    


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 = n
for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
        cnt=0
        while temp%i==0:
            cnt+=1
            temp //= i
        arr.append([i, cnt])

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

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

if arr==[[1,1]]:
    print(0)

else:
    # print(arr)
    total=0
    for i in range(len(arr)):
        x=1
        s=0
        c=-1
        while s<=arr[i][1]:
            s+=x
            x+=1
            c+=1
        total+=c
    print(total)


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

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

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

if arr==[[1,1]]:
    print(0)

else:
    # print(arr)
    total=0
    for i in range(len(arr)):
        x=1
        s=0
        c=-1
        while s<=arr[i][1]:
            s+=x
            x+=1
            c+=1
        total+=c
    print(total)


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])

if arr==[[1,1]]:
    print(0)

else:
    total=0
    for i in range(len(arr)):
        x=1
        s=0
        c=-1
        while s<=arr[i][1]:
            s+=x
            x+=1
            c+=1
        total+=c
    print(total)


Verdicts: Runtime Error

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
    
a=factorization(int(input()))

b=[1,3,6,10,15,21,28,36,43]

ans=0
print(a)
if len(a)==1 and a[0][0]==1:
    print(0)
    exit()

for i in a:
    for j in range(len(b)):
        if i[1]<b[j]:
            ans+=j
            break
print(ans)


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
    
a=factorization(int(input()))

b=[1,3,6,10,15,21,28,36,43]

ans=0
if len(a)==1 and a[0][0]==1:
    print(0)
    exit()

for i in a:
    for j in range(len(b)):
        if i[1]<b[j]:
            ans+=j
            break
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の約数列挙"
def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    return ass

"nの素因数分解"
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass

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())
A = divisor(N)
A.sort()

count = 0
print(A)
for a in A:
  if a == 1:
    continue
  if N % a != 0 and is_prime(a) == False:
    continue
  N //= a
  count += 1

print(count)



24

import math
"nの約数列挙"
def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    return ass

"nの素因数分解"
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass

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 collections
N = int(input())
A = prime_factor(N)
A.sort()
c = collections.Counter(A)
ans = 0
for x in c.values():
  count = 1
  while x > 0:
    x -= count
    if x >= 0:
      count +=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):
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)

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
        m = int(math.sqrt(n)) + 1
        while n != 1 and cnt < m:
            while n % cnt == 0:
                n //= cnt
                value[cnt] += 1
            cnt += 1
        if cnt == m and n != 1:
            value[n] += 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)

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())
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
if N == 1:
  print(0)
  exit(0)
f = factorization(N)
print(f)
ans = 0
amari_cnt = 0
for a,b in f:
  wk = b
  tempc = 1
  while wk  - tempc >= 0:
    wk -= tempc
    ans += 1
    tempc += 1

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

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

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

    return arr
if N == 1:
  print(0)
  exit(0)
f = factorization(N)
#print(f)
ans = 0
amari_cnt = 0
for a,b in f:
  wk = b
  tempc = 1
  while wk  - tempc >= 0:
    wk -= tempc
    ans += 1
    tempc += 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
n=int(input())
noso=[]
count=0
if n==1:
    count=0
elif sosu(n)==1:
        count=1
else:
    for x in range(2,int(n/2)+2):
        if x>n:
            break
        if x in noso:
            pass
        elif x<=10:
            xx=x
            while n%xx==0:
                noso.append(xx)
                count+=1
                n=n/xx
                xx=xx*x
        elif x>11:
            xx=x
            while n%xx==0:
                noso.append(xx)
                count+=1
                n=n/x
                xx=xx*x
print(count)

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())
if n==1:
    ans=0
else:
    a=prime_factorize(n)
    if a==[]:
        ans=1
    else:
        ans=0
        xzen=a[0]
        count=1
        ans+=1
        for x in range(1,len(a)):
            if xzen==a[x]:
                count+=1
                if count==3 or count==6 or count==10 or count==15 or count==21 or count==28 or or count==35:
                    ans+=1
            else:
                xzen=a[x]
                count=1
                ans+=1
print(ans)

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())
if n==1:
    ans=0
else:
    a=prime_factorize(n)
    if a==[]:
        ans=1
    else:
        ans=0
        xzen=a[0]
        count=1
        ans+=1
        for x in range(1,len(a)):
            if xzen==a[x]:
                count+=1
                if count==3 or count==6 or count==10 or count==15 or count==21 or count==28 or count==36:
                    ans+=1
            else:
                xzen=a[x]
                count=1
                ans+=1
print(ans)

Verdicts: Runtime Error

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):
from sys import stdin

def main():
  read = stdin.readline
  N =int(read())
  count = 0
  start = 2
  while(1):
    if N <= start:
      break
    for i in range(start,N+1):
      if N%i == 0:
        count += 1
        N = N//i
        start = i+1
        break
  print(count)
        
      

  
  
  
if __name__ == "__main__":
  main()

from sys import stdin

def waru(a,b):
  if a%b != 0:
    return 0
  if a/b == 1:
    return b
  return waru(a/b,b)
  

def main():
  s = []
  read = stdin.readline
  N =int(read())
  if N == 1:
    print(0)
    exit()
  i = 2
  table = []
  ap = table.append
  while i * i <= N:
    while N%i == 0:
      ap(i)
      N //= i
    i += 1
  if N > 1:
    ap(N)
  set_table = sorted(list(set(table)))
  kaisu = [0] * len(set_table)
  num = 0
  for i in table:
    if i == set_table[num]:
      kaisu[num] += 1
    else:
      num += 1
      kaisu[num] += 1
  maxk = max(kaisu)
  j = 1
  k = 0
  count = 0
  while j <= maxk:
    count += len([i for i in kaisu if i >= j])
    k += 1
    j = j + k + 1
  print(count)
    
      
      

  
  
  
if __name__ == "__main__":
  main()

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

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

if n==1:
  print(0)
  exit()  
  
f=factorization(n)
cnt=0
for i in range(len(f)):
  m=2 
  while f[i][1]>0:
    f[i][1]-=m
    m+=1
    cnt+=1
    print(f)
print(cnt)

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

if n==1:
  print(0)
  exit()  
  
f=factorization(n)
cnt=0
for i in range(len(f)):
  m=2 
  while f[i][1]>0:
    f[i][1]-=m
    m+=1
    cnt+=1
#    print(f)
print(cnt)

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 Counter

N=int(input())
N_=N
f_=[]
for n in range(2,int(N**(1/2))+2):    
    while N_ % n==0: 
        N_=int(N_/n)
        f_.append(n)
        
if len(f_) == 0:
    f_.append(N)
    

C=Counter(f_)
ans=0
for c in C.keys():
    for c_ in range(1,C[c]+1):
        if N % c**c_ == 0:
            N = N/c**c_
            ans+=1
if N==1:
    ans=0
    
print(ans)

from collections import Counter

N=int(input())
N_=N
f_=[]
for n in range(2,int(N**(1/2))+2):    
    while N_ % n==0: 
        N_=int(N_/n)
        f_.append(n)
        
if N_ != 1:
	f_.append(N_)
    
C=Counter(f_)
N_=N
ans=0
for c in C.keys():
    for c_ in range(1,C[c]+1):
        if N_ % c**c_ == 0:
            N_ = N_/c**c_
            ans+=1
if N==1:
    ans=0
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 sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

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

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

if n==1:
	print(0)
else:
	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):
from math import sqrt
from bisect import bisect


def main():
    N = int(input())
    factor = {}
    max_count = 1
    while N > 1:
        for i in range(2, int(sqrt(N))):
            if N % i == 0:
                N = N // i
                if i in factor:
                    factor[i] += 1
                    if max_count < factor[i]:
                        max_count = factor[i]
                else:
                    factor[i] = 1
                break
        else:
            if N in factor:
                factor[N] += 1
                if max_count < factor[i]:
                    max_count = factor[i]
            else:
                factor[N] = 1
            N = 1

    sum_up = [n * (n + 1) // 2 for n in range(max_count+1)]
    ans = 0
    for prime, count in factor.items():
        ans += bisect(sum_up, count)-1
    print(ans)


if __name__ == "__main__":
    main()


from math import sqrt
from bisect import bisect


def main():
    N = int(input())
    factor = {}
    max_count = 1
    while N > 1:
        for i in range(2, int(sqrt(N)) + 1):
            if N % i == 0:
                N = N // i
                if i in factor:
                    factor[i] += 1
                    if max_count < factor[i]:
                        max_count = factor[i]
                else:
                    factor[i] = 1
                break
        else:
            if N in factor:
                factor[N] += 1
                if max_count < factor[N]:
                    max_count = factor[N]
            else:
                factor[N] = 1
            N = 1
    sum_up = [n * (n + 1) // 2 for n in range(max_count + 1)]
    ans = 0
    for prime, count in factor.items():
        ans += bisect(sum_up, count)-1
    print(ans)


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted