Problem:


Score : 400 points

Problem Statement

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

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

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

z divides N;

z is different from all integers chosen in previous operations.

Then, replace N with N/z.

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

Constraints

All values in input are integers.

1 \leq N \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N

Output

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

Sample Input 1

24

Sample Output 1

3

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

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

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

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

Sample Input 2

1

Sample Output 2

0

We cannot apply the operation at all.

Sample Input 3

64

Sample Output 3

3

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

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

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

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

Sample Input 4

1000000007

Sample Output 4

1

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

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

Sample Input 5

997764507000

Sample Output 5

7



Sample input:
24


Sample output:
3

Submission status: Runtime Error

Solution code:
import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
# ----------

INF = float("inf")
MOD = 10 ** 9 + 7
# ----------

def get_count(x):
    if x == 2:
        return 1
    s = set()
    i = 1
    while x:
        if x - i in s:
            break
        s.add(i)
        x -= i
        i += 1
    return len(s)



N = int(input())

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

e = defaultdict(int)
for i in range(2, int(N ** 0.5) + 1):
    while N % i == 0:
        e[i] += 1
        N //= i

if len(e) == 0:
    print(1)
    exit()

ans = 0
for k, v in e.items():
    ans += get_count(v)
print(ans)

Submission status: Runtime Error

Solution code:
import sys
import numpy as np
import math
import random
import sympy
from decimal import Decimal
import itertools
import re
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(2147483647)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

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 = I()
	factos = factorization(n)
	count = 0
	for num, facto in factos:
		sum_tmp = 0
		for i in range(1,facto+1):
			sum_tmp += i
			if sum_tmp <= facto:
				count += 1
	print(count)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())

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

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

arr = factorization(N)

min_nums = [1]
num_lists = [1]
num_dic = {1: 1}

ans = 0

for Z in arr:
    o = Z[1]
    for i, num in enumerate(num_lists):
        if num > o:
            ans += num_dic[num_lists[i-1]]
            break
    if num <= o:
        o = o - num
        _ans = len(min_nums)
        n = min_nums[-1]+1
        while o >= n:
            o -= n
            min_nums.append(n)
            _ans += 1
            num_lists.append(n+num_lists[-1])
            n += 1
        ans += _ans

print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>   
using namespace std;
using namespace __gnu_pbds;
typedef long long ll; 
#define int long long
typedef unsigned long long lu;
typedef vector<ll> v;
typedef vector<vector<ll> > vv;
typedef vector<string>  vs;
typedef vector<pair<ll,ll>> vpr;
typedef long double ld;
#define f(i,n) for(ll i = 0; i < n; i++)
#define ff(i,n) for(ll i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define endl "\n"
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define amax(x,y) if(y>x) x=y;
#define amin(x,y) if(y<x)x=y;
#define bg(x) x.begin()
#define sz(x) (ll)x.size()
#define in(x,n) for(ll i=0;i<n;i++)cin>>x[i]
#define out(x,n) for(ll i=0;i<n;i++)cout<<x[i]<<" " 
#define mxt(a) *(max_element(a.begin(),a.end()))
#define mnt(a) *(min_element(a.begin(),a.end())
#define tc ll t;cin>>t;while(t--)
typedef pair<ll,ll> pi;
#define yes cout<<"YES\n";
#define no cout<<"NO\n";
#define yesno(f) if(f) yes else no
const v dx = {1, -1, 0, 0};
const v dy = {0, 0, 1, -1};
const ld PI = 2 * acos(0.0);
ll cel(ll x1,ll y1){if((x1%y1)==0)return x1/y1;else return x1/y1+1;}
ll power(ll a,ll b,ll m)
{
    if(b==0)
        return 1;
    ll d=power(a,b/2,m);
    d=(d*d)%m;
    if(b&1)
        d=(d*a)%m;
    return d;
}
const ll mod=1e9+7;
int MOD(int a)
{
    if(a<0)
        a+=mod;
    if(a>=mod)
        a%=mod;
    return a;
}
// set_name.find_by_order(k) It returns to an iterator to the kth element (counting from zero) in the set in O(logn) time
// set_name.order_of_key(k) It returns to the number of items that are strictly smaller than our item k in O(logn) time.
/*string operations :
str.substr (x,y) : returns a substring str[x],str[x+1],...str[x+y-1]
str.substr (x) : returns a substring str[x],... end of string
str.find(qtr) : returns the first occurenece of qtr in str */
int fun(int x)
{
	int sum=0;
	int p=1;
	while(sum <=x)
	{
		sum+=p;
		p++;
	}
	return p-2;
}
int32_t main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    int n;cin>>n;
    v vec;
    for(int i=2;i*i<=n;i++)
    {
    	if(n%i==0)
    	{
    		int cnt=0;
    		while(n%i==0)
    		{
    			cnt++;
    			n/=i;
    		}
    		vec.pb(cnt);
    	}
    }
    if(n>1)
    	vec.pb(1);
    int ans=0;
    for(auto it:vec)
    {
    	ans+=fun(it);
    }
    cout<<ans<<endl;
    // int n;cin>>n;
    // cout<<fun(n);
    return 0;
}

Submission status: Runtime Error

Solution code:
from sys import stdin
from math import sqrt
input = stdin.readline

N = int(input())

ans = 0

seen = [0] * 10 ** 6

for i in range(2, int(sqrt(N)) + 1):
    tmp = i

    while N % tmp == 0:

        if seen[tmp] == 1:
            tmp *= i
            continue
        else:
            N //= tmp
            seen[tmp] = 1
            ans += 1
            tmp *= i

if N != 1 and (ans == 0 or seen[N] == 0):
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
p=2
c=0
while n%p==0:
    c+=1
    n//=p
    p*=2
for i in range (3,int(math.sqrt(n))+1,2):
    p=i
    while n%p==0:
        c+=1
        n//=p
        p*=i
t=0
for i in range (2,int(math.sqrt(n))+1):
    if n%i==0:
        t=1
if t==0:
    c+=1
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())

p = [0]*10**6
for i in range(2, 10**6):
    if p[i] == 0:
        p[i] = 1
        j = 2
        while i*j < 10**6:
            p[i*j] = -1
            j += 1

L = []
ans = 0
for i in range(10**6):
    if p[i] < 1:
        continue
    j = 1
    while N%pow(i, j) == 0:
        L.append(pow(i, j))
        N //= pow(i, j)
        j += 1
        ans += 1

L2 = []
i = 2
while i <= N**0.5:
    if N%i == 0:
        L2.append(N, N//i)
    i += 1

if len(L2) == 0 and N > 1 and N not in L:
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
p=[0]*(10**6+1)
for i in range(1,int(n**0.5)+1):
    cnt=0
    while n%(i+1)==0:
        n//=i+1
        cnt+=1
    p[i+1]+=cnt
if n>1:
    p[n]+=1
ans=0
for i in p:
    for j in range(1,44):
        if j*(j+1)//2>i:
            ans+=j-1
            break
print(ans)

Submission status: Runtime Error

Solution code:
import collections
n = int(input())
if n == 1 or n == 2 or n == 3:
    print(0)
else:
    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
    c = collections.Counter(prime_factorize(n))

    ans = 0
    if len(c) == 1:
        if c.values() == 1:
            ans += 1
        else:
            for k in range(1,100):
                if k/2*(2+(k-1)) >= list(c.values())[0]:
                    ans += k
                    break
    else:
        for l in range(len(c)):
            i == list(c.keys())[l]
            j = list(c.values())[l]
            if j == 1 or j == 2:
                ans += 1
            else:
                for k in range(1,100):
                    if k/2*(2+(k-1)) >= j:
                        ans += k
                        break

    print(ans)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

//Minimum Macros
using ll = long long;
using ul = unsigned long;
using ull = unsigned long long;
#define rep(_i,_n) for(ll _i = 0; _i < _n; ++_i)
#define rep2(_i,_s,_n) for(ll _i = _s; _i < _n; ++_i)
#define elif else if
//Vector Macros
#define vec vector
#define append(_x) push_back(_x)
#define fullSort(_a) sort(_a.begin(), _a.end())
#define inputVecI(_name, _n) vec<int> _name(_n);rep(_i, _n)cin >> _name[_i];
#define inputVecL(_name, _n) vec<long> _name(_n);rep(_i, _n)cin >> _name[_i];
#define inputVecLL(_name, _n) vec<ll> _name(_n);rep(_i, _n)cin >> _name[_i];
#define inputVecUL(_name, _n) vec<ul> _name(_n);rep(_i, _n)cin >> _name[_i];
#define inputVecULL(_name, _n) vec<ull> _name(_n);rep(_i, _n)cin >> _name[_i];
#define inputVecS(_name, _n) vec<string> _name(_n);rep(_i, _n)cin >> _name[_i];
#define maxIdx(_name) distance(_name.begin(), max_element(_name.begin(), _name.end()))
#define printVec(_vec) cout << "{";rep(i, _vec.size()-1)cout << _vec[i] << ",";cout << _vec[_vec.size()-1];cout << "}\n";
//Graph Macros
using Graph = vec<vec<long>>;
inline vec<long> BFS(Graph _g, long start){
  vec<long> _ans(_g.size(), -1); _ans[start] = 0; queue<long> _que; _que.push(start);
  while(!_que.empty()){
    long _target = _que.front(); _que.pop();
    for(long _towhere : _g[_target]){
      if(_ans[_towhere] == -1){
        _ans[_towhere] = _ans[_target] + 1; _que.push(_towhere);
      }
    }
  }
  return _ans;
}

int main()
{
    ull N;
    cin >> N;
    ull buf1 = 1, buf2 = 0;
    ull ans = 0;
    for(ull i = 2; i <= N;){
      if(N % i == 0){
        N /= i;
        buf2++;
        if(buf2 >= buf1){
          buf2 = 0;
          buf1++;
          ans++;
        }
      }
      else{
        buf1 = 1; buf2 = 0;
        i++;
      }
    }
    cout << ans << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    if n == 1:
        print(0)
        return
    def eratos(n):
        flag = [True] * (n + 1)
        for i in range(2, int(n**0.5) + 1):
            if flag[i]:
                for j in range(2*i, n + 1, i):
                    flag[j] = False
        return [i for i, x in enumerate(flag) if x and i >= 2]
    p = eratos(10**6)
    work = []
    for i in p:
        piyo = 0
        while n % i == 0:
            n //= i
            piyo += 1
        if piyo > 0:
            work.append(piyo)
        if n == 1:
            break
    if len(work) == 0:
        print(1)
        break
    else:
        result = 0
        for i in work:
            for j in range(1, 10**6):
                i -= j
                if i <0:
                    break
                result += 1
    if n != 1:
        result += 1
    print(result)
main()

Submission status: Runtime Error

Solution code:
n=int(input())
p=[0]*(10**6+1)
for i in range(1,int(n**0.5)+1):
    cnt=0
    while n%(i+1)==0:
        n//=i+1
        cnt+=1
    p[i+1]+=cnt
if n>1:
    p[n]+=1
ans=0
for i in p:
    for j in range(1,44):
        if j*(j+1)//2>i:
            ans+=j-1
            break
print(ans)

Submission status: Runtime Error

Solution code:
input_count = 0

import math

A, B = input().split()

A = int(A)
if '.' in B:
    B_a = int(B.split('.')[0])
    B_b_size = len(B.split('.')[1])
    B_b =  int(B.split('.')[1])
else:
    B_a = int(B)
    B_b_size = 0
    B_b = 0
ans_a = A * B_a
ans_b = A * B_b 
ans = ans_a + int(ans_b * pow(10, B_b_size))
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

count = 0
z = sympy.divisors(N)

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

elif len(z) == 2:
    print(1)
    exit()

else:
    for i in range(1, len(z)):
        if N%z[i] == 0:
            count += 1
            N = N/z[i]

print(count)

Submission status: Runtime Error

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
#sys.stdin = open("input.txt", "r")
#sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)
is_prime=[1 for i in range(10**6+1)]
is_prime[0]=0
is_prime[1]=0
for i in range(2,10**6+1):
    if(is_prime[i]):
        for j in range(2*i,10**6+1,i):
            is_prime[j]=0
n=l()[0]
div=[]
if(n==1):
    print(0)
    exit()
for i  in range(2,int(n**0.5)+1):
    if(n%i==0 and is_prime[i]):
        div.append(i)
        if(is_prime[n//i] and n//i!=i):
            div.append(n//i)
ans=0
for p in range(1,n//div[0]):
    x=n
    for ele in div:
        if(n%(ele**p)==0):
            # print(n,ele**p)
            ans+=1
            n//=(ele**p)
        else:
            break
    if(x==n):
        break
# print(ans)
for i in range(ele**p,n+1):
    if(x%i==0):
        x//=i
        ans+=1
    if(x==1):
        break
print(ans)

Submission status: Runtime Error

Solution code:
import math

#試し割法
def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
        return 'prime number'
    else:
        factor.append(n)
        return factor
      
n = int(input())
n_list = trial_division(n)
ans = 0
z = []
for i in range(len(n_list)):
  if n_list[i] == 1:
    break
  else:
    if n % n_list[i] == 0:
      z.append(n_list[i])
      n = n / n_list[i]
      ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

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

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

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

    return arr

n = int(input())

ans = []
used_list = []

def solve(n, used_list):
  if n == 1:
    return len(used_list)
  div_list = sympy.divisors(n)[1:]
  for i in div_list:
    z_kouho = factorization(i)
    if i not in used_list and len(z_kouho) == 1:
      used_list.append(i)
      return solve(int(n/i),used_list)
  
  return len(used_list)
      
print(solve(n, used_list))

Submission status: Runtime Error

Solution code:
n = int(input())
t = 0
while n != 1:
  for i in range(n):
    if n % i = 0:
      n /= i
      t += 1
    
print(t)

Submission status: Runtime Error

Solution code:
n = int(input())
t = 0
while n != 1:
  if n // i = 0:
    n /= i
    t += 1
    
print(t)

Submission status: Runtime Error

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

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

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

    return arr

def main():
    N = int(input())
    #xxx = list(map(int, input().split()))

    if N == 1:
        print(0)
        return

    e_num = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4]
    e_list = factorization(N)

    ans = 0
    for e in e_list:
        ans += e_num[e]
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
import sympy

# 実行環境(0:vscode, 1:atcoder)
MODE = 1

# 入力の次元
DIMENSION = 0

# int型に変換
INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]


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


F = factorization(s)

cnt = 0
for i in range(len(F)):
    num = 1
    while 1:
        F[i][1] -= num
        if F[i][1] < 0:
            break
        else:
            num += 1
            cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;

template <typename L, typename R>
ostream& operator<<(ostream& out, const pair<L, R>& p) {
    out << "(" << p.first << ", " << p.second << ")";
    return out;
}

template <typename L, typename R>
istream& operator>>(istream& in, pair<L, R>& p) {
    in >> p.first >> p.second;
    return in;
}

const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;

#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = ll(b) - 1; i >= (a); i--)
#define TR(X)                                                  \
    ({                                                         \
        if (0) cerr << "TR: " << (#X) << " = " << (X) << endl; \
    })
#define LL(name) \
    ll name;     \
    cin >> name;
#define VL(name, num) \
    vl name(num);     \
    FOR(INPUT_VL_I, 0, num) { cin >> name[INPUT_VL_I]; }

static ll f(ll cnt) {
    ll res = 0;

    for (ll i = 1; i <= cnt; i++) {
        res ++;
        cnt -= i;
    }
    TR(cnt);
    TR(res);

    return res;
}
int main() { cin.sync_with_stdio(0);
    ll N; cin >> N;

    const ll oldN = N;

    ll ans = 0;
    for (ll i = 2; i * i <= oldN; i++) {
        ll cnt = 0;
        while (N % i == 0) {
            cnt ++;
            N /= i;
        }
        if (cnt) {
            ans += f(cnt);
        }
    }

    if (N != 1) ans ++;
    cout << ans << endl;


}  // cin.tie(0) bei schnellem Wechseln

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define full(a) a.begin(),a.end()
#define rfull(a) a.rbegin(),a.rend()

using namespace std;
const double pi=acos(-1.0);
const double pii=2*pi;
const double eps=1e-6;
const long long MOD=1e9+7;

int f(int x){
    int ans=0;
    for(int i=1;i<100;i++){
        if(x>=i){
            x-=i;
            ans++;
        }
    }
    return ans;
}

void solve(){
    long long n;
    cin>>n;
    vector<int> primes;
    vector<bool> p(int(1e6)+1,true);
    p[0]=p[1]=false;
    for(int i=0;i<p.size();i++){
        if(p[i]){
            primes.pb(i);
            int j=i;
            while(1ll*i*j<p.size()){
                p[i*j]=false;
                j++;
            }
        }
    }
    int ans=0;
    for(int i=0;i<primes.size();i++){
        if(n%primes[i]==0){
            int x=0;
            while(n%primes[i]==0){
                x++;
                n/=primes[i];
            }
            ans+=f(x);
        }
    }
    if(n!=1){
        ans+=1;
    }
    cout<<ans<<"\n";
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

    solve();
    return 0;
}

Submission status: Runtime Error

Solution code:
import math

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

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

    return True

n = int(input())
a = is_prime(n)
if a:
    print(1)
else:
    ans = 0
    con = 2
    while True:
        if n % con == 0:
            ans +=1
            n = n // con
            b = is_prime(n)
        if n == 1 or b:
            break
        con +=1
    print(ans)

Submission status: Runtime Error

Solution code:
from collections import deque
N = int(input())

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

q = deque()
for x in make_divisors(N):
  q.append(x)
  
count = 0
done = []
while N != 1:
  x = q.popleft()
  if x == 1:
    continue
  
  if x in done:
    mul = x
    while mul in done:
      mul *= q.popleft()
    
  if N % x == 0:
    N = N // x
    count += 1
    done.append(x)

print(count)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    a = [float(i) for i in input().split()]
    b= int(a[0])
    c = int(a[1]*100)
    d = int(b*c//100)
    print(d)

Submission status: Runtime Error

Solution code:
from __future__ import division, print_function

''' Hey stalker :) '''
INF = 10 ** 10
TEST_CASES = False
import math

def prime_factors(n):  # n**0.5 complex
    factors = dict()
    for i in range(2, math.ceil(math.sqrt(n)) + 1):
        while n % i == 0:
            if i in factors:
                factors[i] += 1
            else:
                factors[i] = 1
            n = n // i
    if n > 2:
        factors[n] = 1
    return (factors)

def main():
    n = get_int()
    fac = prime_factors(n)
    res = 0
    for key in fac:
        base = 1
        while fac[key]>=base:
            res += 1
            fac[key] -= base
            base += 1
    print(res)

''' FastIO Footer: PyRival Library, Thanks @c1729 and contributors '''
import os
import sys
from bisect import bisect_left, bisect_right
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

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


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


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
# else:
#     sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")
get_int = lambda: int(input())
get_list = lambda: list(map(int, input().split()))
if __name__ == "__main__":
    if TEST_CASES:
        [main() for _ in range(int(input()))]
    else:
        main()

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double

int main() {
    ll N;
    cin >> N;
    ll r = sqrt(N);
    map<ll, ll> mp;
    for (ll i = 2; i <= r; i++) {
        if (N%i == 0) {
            ll pcnt = 0;
            while (N%i == 0) {
                N /= i;
                pcnt++;
            }
            mp[i] = pcnt;
        }
    }
    if (N > 1) mp[N] = 1;
    
    ll ans = 0;
    for (auto p : mp) {
        ll t = 1;
        while ((t+1)*(t+2)/2 <= p.second) t++;
        ans += t;
    }
    cout << ans << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define int ll
typedef long double ld;

typedef pair<int,int> pii;
#define x first
#define y second

const int INF=1e18;

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int n;
    cin>>n;
    int ans=0;
    for(int i=2;i*i<=n;i++)
    {
        int k=0;
        while(n%i==0)
            k++,
            n/=i;
        for(int j=1;k>=j;j++)
            k-=j,
            ans++;
    }
    if(n>1)
        ans++;
    cout<<ans;
}

Submission status: Runtime Error

Solution code:
import math

a,b = map(float,input().split())
ans = math.floor(a*b)
print(ans)