criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

vector<pair<long long, long long> > prime_factorize(long long N) {
    vector<pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}

bool is_prime(long long N) {
    if (N == 1) return false;
    for (long long i = 2; i * i <= N; ++i) {
        if (N % i == 0) return false;
    }
    return true;
}

int main() {
    long long N;
  long long xx =0,yy=0;
    cin >> N;
    const auto &res = prime_factorize(N);
    for (auto p : res) {
        for (int i = 0; i < p.second; ++i){
          if(x!=p.first){
            x=p.first;
            yy=1;
            while(yy>=k*(k+1)/2){
          k++;
        }
        ans+=(k-1);
        k=0;
          }else{
            yy+=1;
          }
        }
    }
    long long ans=0,k=0;
    long long n=floor(sqrt(N));
    if(is_prime(N)){
      cout<<1;
      return 0;
    }

    cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:14: error: 'x' was not declared in this scope
   40 |           if(x!=p.first){
      |              ^
a.cc:43:23: error: 'k' was not declared in this scope
   43 |             while(yy>=k*(k+1)/2){
      |                       ^
a.cc:46:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |         ans+=(k-1);
      |         ^~~
      |         abs
a.cc:46:15: error: 'k' was not declared in this scope
   46 |         ans+=(k-1);
      |               ^
Language: C++

//高知能系Vtuberの高井茅乃です。
//Twitter: https://twitter.com/takaichino
//YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define INTINF 1999999999
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define MODA 1000000007 

int main() {
	//エラトステネスの篩でP_max以下の素数vector primeをつくる
	bool *pr;
	ll P_max = 1000000; //10^6くらいまでが現実的か
	pr = (bool*)malloc(sizeof(bool) * (P_max+1));
	REP(i, P_max + 1) pr[i] = true;
	pr[0] = false;
	pr[1] = false;
	for(ll i = 2; i * i <= P_max; i++){ 
		if(pr[i] == true){
			for(ll j = 2 * i; j <= P_max; j+=i){
				pr[j] = false;
			}
		}
	}
	vector<ll> prime;
	for(ll i = 2; i <= P_max; i++){
		if(pr[i]) prime.push_back(i);
	}
	//
	ll n;
	cin >> n;
	//整数Xの素因数分解の結果をmapで返す。上のvector primeはもちろんいる
	ll X = n;
	ll diving = X; //これをどんどん割っていく。dividingが正しい
	map<ll, ll> prf;
	for(ll i = 0; diving > 1 && prime[i] * prime[i] <= X; i++){
		while (diving % prime[i] == 0)
		{
			diving /= prime[i];
			prf[prime[i]]++;
		}
	}
	if(diving > 1)prf[diving]++;

	ll ere = 0;
	ll ans = 0;
	for(auto i = prf.begin(); i!= prf.end(); i++){
		for(ere = 1; ere <= i->second; ere++){
			ans ++;
			i->second -= re;
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:38: error: 're' was not declared in this scope; did you mean 'ere'?
   54 |                         i->second -= re;
      |                                      ^~
      |                                      ere
Language: C++

#include<iostream>
#include<string>
#include<algorithm>    
#include<cmath>
#include<map>
#include<vector>
#include<math.h>
#include<stdio.h>
#include<stack>
#include<queue>
#include<tuple>
#include<cassert>
#include<set>
//#include<bits/stdc++.h>
using ll = long long;
using namespace std;
const ll INF = 1000000000000000000;
const ll mod = 1000000007;
vector<ll> res(12345678), ko(12345678);
void divisor(ll n) {
	for (int i = 2; i * i <= n; i++) {
		ll a = 0; res.push_back(i);
		while (n % i == 0) {
			a++;
			n /= i;
		}
		ko.push_back(a);
	}
	return;
}
signed main() {
	vector<ll> v; map<ll, ll> cost;
	ll n, m, a = 0, b = 0, c, x, cnt = 0, ans = 0; string s, t;
	cin >> n; a = n; vector<ll>v; sort(res.begin(), res.end());
	for (int h = 0; h < res.size(); h++) {
		cnt = 1;
		for (int i = 0; i < ko[h]; i++) {
			cnt *= res[h]; v.push_back(cnt);
		}
	}
	sort(v.begin(), v.end());
	for (int h = 0; h < n; h++) {
		if (n % v[h] == 0) { n /= v[h]; ans++; }
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:36: error: redeclaration of 'std::vector<long long int> v'
   34 |         cin >> n; a = n; vector<ll>v; sort(res.begin(), res.end());
      |                                    ^
a.cc:32:20: note: 'std::vector<long long int> v' previously declared here
   32 |         vector<ll> v; map<ll, ll> cost;
      |                    ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using ll = long long int;
using vec = vector<int>;
using P = pair<int,int>;
const int INF = 1e9+7;

int main() {
  ll n;
  cin >> n;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }

  ll n0 = n;

  ll m=2;
  for (; m*m <= n0; m++);

  vector<bool> vb(m+1, false);

  int c = 0;
  for (ll i = 2; i*i <= n; i++) {
    if (vb[i]) continue;
    ll z = i;
    while (n % z == 0) {
      n = n / z;
      c++;
      vb[z] = true;
      z *= i;
    }
    if (n == 1) break;
  }

  if (i != 1) c++;

  cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:7: error: 'i' was not declared in this scope
   38 |   if (i != 1) c++;
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
                    
                    
int main(){
    int N, ans;
    cin >> N;
    ans = 0;
    int c = 2;
    while(N > 1){ 
        
        if(N % c == 0){
            N = N / c;
            ans++;
        } 
        c++;
      	c = N % c;
        if(N < c){
            break;
        }
            
 
    }
 
    cout << ans << endl;
 

Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: expected '}' at end of input
   25 |     cout << ans << endl;
      |                         ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long solve(long long n){
    double v1 = (-1.0+sqrt(1+8*n))/2.0;
    // double v2 = (-1-sqrt(1+8*n))/2;
    // long long ans = (long long)v1;
    return (long long)v1;
}
int main() {
    // cout<<solve(1)<<"\n";
    long long n; cin>>n;
    long long till = sqrt(n)+5;
    bool prime[1000006];
    for(long long i=0; i<1000006; ++i){
        prime[i] = true;
    }
    
    for(long lonf i=2; i<1000006; ++i){
        if(prime[i]){
            for(long long j=2*i; j<1000006; j+=i){
                prime[j] = false;
            }
        }
    }
    // for(int i=2; i<1000; ++i){
    //     if(prime[i]){
    //         cout<<i<<" ";
    //     }
    // }
    // cout<<"\n";
    long long t = n;
    long long ans = 0;
    for(long long i=2; i<till; ++i){
        long long q = 0;
        if(prime[i] && t%i==0){
            // cout<<n<<" ";
            // cout<<i<<"\n";
            while(n>0 && n%i==0){
                n/=i;
                ++q;
            }
            // cout<<"q is "<<q<<"\n";
            ans+=solve(q);
        }   
    }
    if(ans==0){
        cout<<"1";
        return 0;
    }
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected ';' before 'i'
   18 |     for(long lonf i=2; i<1000006; ++i){
      |                  ^~
      |                  ;
a.cc:18:19: error: 'i' was not declared in this scope
   18 |     for(long lonf i=2; i<1000006; ++i){
      |                   ^
a.cc:18:33: error: expected ')' before ';' token
   18 |     for(long lonf i=2; i<1000006; ++i){
      |        ~                        ^
      |                                 )
a.cc:18:37: error: 'i' was not declared in this scope
   18 |     for(long lonf i=2; i<1000006; ++i){
      |                                     ^
Language: C++

void solve()
{
	int n;
	cin >> n;
	map<int, int> mp;
	while(n % 2 == 0)
	{
		mp[2]++;
		n /= 2;
	}
	for(int i = 3; i * i <= n; i++)
	{
		while(n % i == 0)
		{
			mp[i]++;
			n /= i;
		}
	}
	if(n > 1)
	{
		mp[n]++;
	}
	int ret = 0;
	for(auto x : mp)
	{
		int s = 1;
		int e = x.second;
		int ans = 0;
		while(s <= e)
		{
			int mid = s + e >> 1;
			int temp = ((1 + mid) * mid) / 2;
			if(temp <= x.second)
			{
				ans = mid;
				s = mid + 1;
			}
			else
			{
				e = mid - 1;
			}
		}
		ret += ans;
	}
	cout << ret << endl;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> n;
      |         ^~~
a.cc:5:9: error: 'map' was not declared in this scope
    5 |         map<int, int> mp;
      |         ^~~
a.cc:5:13: error: expected primary-expression before 'int'
    5 |         map<int, int> mp;
      |             ^~~
a.cc:8:17: error: 'mp' was not declared in this scope
    8 |                 mp[2]++;
      |                 ^~
a.cc:15:25: error: 'mp' was not declared in this scope
   15 |                         mp[i]++;
      |                         ^~
a.cc:21:17: error: 'mp' was not declared in this scope
   21 |                 mp[n]++;
      |                 ^~
a.cc:24:22: error: 'mp' was not declared in this scope
   24 |         for(auto x : mp)
      |                      ^~
a.cc:45:9: error: 'cout' was not declared in this scope
   45 |         cout << ret << endl;
      |         ^~~~
a.cc:45:24: error: 'endl' was not declared in this scope
   45 |         cout << ret << endl;
      |                        ^~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;

bool is_prime(int64_t);
void decomposit_primes(int64_t);

vector<int64_t> primes;

int main()
{
  int64_t n;
  cin >> n;
  
  if (n == 1LL)
  {
    cout << 0;
    return 0;
  }
  
  if (is_prime(n))
  {
    cout << 1;
    return 0;
  }
  
  primes = {};
  
  decomposit_primes(n);
  vector<int64_t> used_numbers = {};
}

bool is_prime(int64_t n)
{
  for (int64_t i = 2LL; i < (int64_t)(sqrt((double)n)); i ++)
  {
    if (n % i == 0) return false;
  }
  return true;
}

void decomposit_primes(int64_t n)
{
  int64_t a = 2;
  while (n >= a * a)
  {
    if (n % a == 0)
    {
      primes.push_back(a);
      n /= a;
    }
    else
    {
      a ++;
    }
  }
  primes.push_back(n);
}

Compiler output:
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<int64_t> primes;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:27:3: error: 'primes' was not declared in this scope
   27 |   primes = {};
      |   ^~~~~~
a.cc:30:3: error: 'vector' was not declared in this scope
   30 |   vector<int64_t> used_numbers = {};
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<cmath>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:30:17: error: expected primary-expression before '>' token
   30 |   vector<int64_t> used_numbers = {};
      |                 ^
a.cc:30:19: error: 'used_numbers' was not declared in this scope
   30 |   vector<int64_t> used_numbers = {};
      |                   ^~~~~~~~~~~~
a.cc: In function 'void decomposit_primes(int64_t)':
a.cc:49:7: error: 'primes' was not declared in this scope
   49 |       primes.push_back(a);
      |       ^~~~~~
a.cc:57:3: error: 'primes' was not declared in this scope
   57 |   primes.push_back(n);
      |   ^~~~~~
Language: C++

import numpy as np
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
  
def z(p):
    n = (-1+np.sqrt(1+8*p))/2
    return int(n)
arr = factorization(N)
if N == 1:
    print(0)
else:
    print(np.sum([z(a[-1]) for a in arr]))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
int main()
{
    long long n,k=1,p=0,q,i,l=n;
    cin>>n;
    l=n;
    for(i=2;i<=sqrt(l) && i<=n;i++)
    {
        if(n%i==0)
        {
            k=1;
            q=k;
            while(n%i==0)
            {
                n/=i;
                k--;
                if(k==0){
                    k=q+1;
                    q=k;
                    p++;
                }
            }
        }
    }
    if(l!=1 && p==0)
        p++;
    cout<<p<<endl;

    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:31:14: error: expected '}' at end of input
   31 |     return 0;
      |              ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int i,j,k,count1=0,count2=0;
bool IsPrime(long long int num){
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (long long int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

int main(void){
    int ans=0;
    long long int n,a;
    cin>>n;
    if(n==1){
        cout<<0<<endl;
        return 0;
    }
    if(IsPrime(n)){
        cout<<1<<endl;
        return 0;
    }
    list<int> list;
    if(n%2==0){
        count1=0;
        while(n%2==0){
            n/=2;
            count1++;
        }
        a=1;
            while(a<=count1){
                ans++;
                count1-=a;
                a++;
            }
    }
    if(n>100000000){
        long long int sqrtN=sqrt(n)+1;
        for(long long int i=3;i<=sqrtN;i+=2){
            if(sqrtN%i==0){
                count1=0;
                while(sqrtN%i==0){
                    sqrtN/=i;
                    count1++;
                }
                count*=2;
                a=1;
                while(a<=count1){
                    ans++;
                    count1-=a;
                    a++;
                }
            }
        }
    }else{
    for(long long int i=3;i<=n;i+=2){
        if(n%i==0){
            count1=0;
            while(n%i==0){
                n/=i;
                count1++;
            }
            a=1;
            while(a<=count1){
                ans++;
                count1-=a;
                a++;
            }
        }
    }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:24: error: overloaded function with no contextual type information
   58 |                 count*=2;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define PI 3.14159265358979323846264338327950L
 
int main(){
  long long N;
  cin >> N;
  long long t = 0;
  if(N == 1){
    cout << 0 << endl;
  }else{
long long f = 1;
long long a = 1;
for(long long z = 2;t < N ;t++){
if(N % z == 0){
  while(N % f == 0){
    f = f * t;
    N = N / f;
    t++;
  }
}
  if(t == 0){
    t = 1;
  }
  cout << t << endl;
  }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
 
#define pi 3.1415926535
 
bool IsPrime(ll num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;

    ld sqrtNum = sqrt(num);
    for (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}

int main()
{
  ll n;
  cin >> n;
  ll max = sqrt(n);

  if(n == 1){
    cout << 0 << endl;
    return 0;
  }

  if(IsPrime(n)){
    cout << 1 << endl;
    return 0;
  }

  ll ans = 0;
  ll div = 2;
  while(n % div == 0){
    ans++;
    n /= div;
    div *= 2;
  }

  for(ll i = 3; i <= max; i++;){
    div = i;
    while(n % div == 0){
      ans++;
      n /= div;
      div *= i;
    }
  }

  cout << ans << endl;
 
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:30: error: expected ')' before ';' token
   50 |   for(ll i = 3; i <= max; i++;){
      |      ~                       ^
      |                              )
a.cc:50:31: error: expected primary-expression before ')' token
   50 |   for(ll i = 3; i <= max; i++;){
      |                               ^
Language: C++

¥#include <bits/stdc++.h>
using namespace std;

int main() {
  long long n;
  int cnt=0,l;
  cin >> n;
  vector<int>a(1000010,0);

  for (int i = 2; i < 1000010; i++) {
    while (n % i == 0) {
      a.at(i)++;
      n = n/i;
    }
  }
  for (int i = 0; i < 1000010; i++) {
    if (a.at(i) == 0) continue;
    else {
      l=1;
      while (a.at(i) >= 0) {
        a.at(i) -= l;
        cnt++;
        l++;
      }
      cnt--;
    }
  }
  cout << cnt << endl;
}



Compiler output:
a.cc:1:1: error: extended character ¥ is not valid in an identifier
    1 | ¥#include <bits/stdc++.h>
      | ^
a.cc:1:2: error: stray '#' in program
    1 | ¥#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: '\U000000a5' does not name a type
    1 | ¥#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int>a(1000010,0);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int>a(1000010,0);
      |          ^~~
a.cc:12:7: error: 'a' was not declared in this scope
   12 |       a.at(i)++;
      |       ^
a.cc:17:9: error: 'a' was not declared in this scope
   17 |     if (a.at(i) == 0) continue;
      |         ^
a.cc:28:3: error: 'cout' was not declared in this scope
   28 |   cout << cnt << endl;
      |   ^~~~
a.cc:28:18: error: 'endl' was not declared in this scope
   28 |   cout << cnt << endl;
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
void fac(long long n,vector<long long> &ans) 
{ 
    int cnt = 0; 
    while(!(n%2)) { 
        n>>=1;
        cnt++; 
    } 
    if(cnt) 
      ans.push_back(cnt); 
    for (long long i = 3; i <= sqrt(n); i += 2) { 
        cnt=0; 
        while(n%i==0) { 
            count++; 
            n=n/i; 
        } 
        if (cnt) 
            ans.push_back(cnt);
    } 
    if (n>2) 
       ans.push_back(1);
} 
int main(){
 long long n;
 cin>>n;
 vector<long long >nums;
 fac(n,nums);
 int val=0;
 if(n!=1){
 for(int i=0;i<nums.size();i++){
 	int spikes=1;
 	int j=1;
 	while(spikes<=nums[i]){
 			j++;
 		spikes+=j;
 		val++;
	 }
 }}
 cout<<val<<"\n";
}

Compiler output:
a.cc: In function 'void fac(long long int, std::vector<long long int>&)':
a.cc:15:18: error: no post-increment operator for type
   15 |             count++;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const static ll INF = 1e15;
// __uint128_t
//素数判定
bool isPrime(ll x){
    ll i;
    if(x < 2)return 0;
    else if(x == 2) return 1;
    if(x%2 == 0) return 0;
    for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
    return 1;
}




int main(){
    ll N; cin >> N;
    if(isPrime(N)){
        cout << 1 << endl;
        return 0;
    }
    map<ll, ll> M;
    for(ll i = 2; i <= min((ll)1e6+5, N); i++ ){
        if(!isPrime(i)) continue;
        //cout << i << endl;
        bool flag = false;
        while(N % i == 0){
            N /= i;
            M[i]++;
        }
        if(flag && isPrime(N)) {
            M[N]++;
            N = 1;
            break;
        }
        else if(N == 1) break;
    }
    ll ans = 0;
    if(N != 1){
        
        if(ceill(sqrt(N)) * ceill(sqrt(N)) == N) ans++;
        else cans+=2;
        
    }
    ll ans = 0;
    for(auto m : M){
        ll cnt = 1;
        while(1){
            if(m.second >= cnt) {
                m.second -= cnt;
                cnt++;
                ans++;
            }
            else break;
            
        }
    }
    cout << ans << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:14: error: 'cans' was not declared in this scope; did you mean 'ans'?
   45 |         else cans+=2;
      |              ^~~~
      |              ans
a.cc:48:8: error: redeclaration of 'll ans'
   48 |     ll ans = 0;
      |        ^~~
a.cc:41:8: note: 'll ans' previously declared here
   41 |     ll ans = 0;
      |        ^~~
Language: Java

import java.util.Scanner;

public class D {


    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
       long n=sc.nextLong();
       long copyn=n;
       long x=(long)Math.sqrt(n);
       long copyx=x;
       long ans=0;
       for(int i=2;i<=x;i++)
       {
           int count=1;
           while(n%((Math.pow(i,count)))==0)
           {

               n= (long) (n/Math.pow(i,count));
               count++;
               ans++;
           }
       }

       if(copyn==1)
       {
           System.out.println(0);
       }
       else

       if(n>x)
       {
           System.out.println(1+ans);
       }
       else
       {
           System.out.println(ans);
       }

    }
}


Compiler output:
Main.java:3: error: class D is public, should be declared in a file named D.java
public class D {
       ^
1 error
Language: Java



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;

public final class D {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        BigInteger first = new BigInteger(in.nextLine());
        if (first.equals(BigInteger.ONE)) {
            System.out.println(0);
            return;
        }
        int res = 0;
        for (long i = 2; BigInteger.valueOf(i).multiply(BigInteger.valueOf(i)).compareTo(first) <= 0; i++) {
            int counter = 1;
            int c = 2;
            for (int j = 1; first.mod(BigInteger.valueOf(i)).equals(BigInteger.ZERO); j++) {
                first = first.divide(BigInteger.valueOf(i));
                if (counter == j) {
                    res++;
                    counter += c++;
                }
            }
        }
        System.out.println(res == 0 ? 1 : res);
    }
}


Compiler output:
Main.java:8: error: class D is public, should be declared in a file named D.java
public final class D {
             ^
1 error
Language: C++

#include <iostream>
#include <map>
using namespace std;

map<int,int>prime_factor(int n){
    map<int,int> res;
    for(int i=2;i*i<=n;i++){
        while(n%i==0){
            ++res[i];
            n/=i;
        }
        if(n!=1)res[n]=1;
        return res;
    }

int fact(int n){
    int fact=1;
    for(i=1; i<=n; ++i) {
    fact = fact * i;
  }
  return fact;
}

int main(void){
    int N;
    map<int,int>ans=prime_factor(N);
    int ans=0;
    for(auto itr=ans.begin();itr!=ans.end();itr++){
        int num=itr->second;
        ans+=fact(num)
    }
    cout<<ans<<endl;
    
}


Compiler output:
a.cc: In function 'std::map<int, int> prime_factor(int)':
a.cc:16:16: error: a function-definition is not allowed here before '{' token
   16 | int fact(int n){
      |                ^
a.cc:24:15: error: a function-definition is not allowed here before '{' token
   24 | int main(void){
      |               ^
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:5:32: note: to match this '{'
    5 | map<int,int>prime_factor(int n){
      |                                ^
a.cc:34:2: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      |  ^
Language: C++

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

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
  
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
 
#define FS              ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll              long long int
#define ld              long double
#define pb              push_back
#define bp              __builtin_popcount
#define sz              size()
#define ff              first
#define ss              second
#define vll             vector<ll>
#define vbool           vector<bool>
#define vpll            vector<pair<ll,ll>>
#define pll             pair<ll,ll>
#define vllv            vector<vector<ll>>
#define setpri(x)       cout<<setprecision(x)<<fixed;
#define all(v)          v.begin(),v.end()
#define allr(v)         v.rbegin(),v.rend()
#define yesr {cout<<"YES"<<endl;return;}
#define nor {cout<<"NO"<<endl;return;}
// getline (std::cin,name);
ll MOD=1e9+7;
ll ceil1(ll n,ll x){return (n-1)/x+(n>0);}

ll gcd(ll a,ll b){return __gcd(a,b);}
ll lcm(ll a,ll b){return (max(a,b)/gcd(a,b))*min(a,b);}

ll pow1(ll n,ll m ,ll mod=MOD );
ll pow2(ll n,ll k);

ll modinv(ll n,ll mod){  return pow1(n,mod-2,mod);}

bool func(pair<ll,ll> &a,pair<ll,ll> &b ){
        if(a.ff != b.ff)return a.ff < b.ff;
        return a.ss > b.ss;
}
ll const N=(ll)1e3+11;

void solve(){
        ll i,j,k,l,n,m,x,y,z,r;
        
        cin>>n;
        map<ll,ll> mp;
        for(i=2;i*i<=n;i++){
                ll c=0;
                while(n%i==0){
                        n/=i;
                        c++;
                }
                if(c){
                        mp[i]=c;
                }
        }
        if(n>1){
                mp[n]=1;
        }
        ll ans=0;
        for(auto x:mp){
                ll tt=1;
                while(((tt+1)*(tt+2))/2<=x.ss){
                        tt++;
                }
                ans+=tt;
        }
        cout<<ans<<endl;
        
        
      
       
}
int main(){
        FS;
        ll i,j,k,n,m,x,y,z,q;
        q=1;
        // cin>>q;
        while(q--){
                solve();
        }
        return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccZprQr2.o: in function `modinv(long long, long long)':
a.cc:(.text+0xe1): undefined reference to `pow1(long long, long long, long long)'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#define inf 0x3f3f3f3f
using namespace std;
typedef unsigned long long ull;
long long n;
long long a[1123456];
signed main() {
	long long n;
	cin >> n;
	long long i;
	bool bol = false;
	long long t = long long(sqrt(n));
	if (n == 1) {
		cout << 0 << endl;
		return 0;
	}
	for (i = 2; i <= t; i++) {
		while (n % i == 0) {
			n /= i;
			a[i]++;
			bol = true;
		}
	}
	long long ans = 0, cnt;
	if (!bol)cout << 1 << endl;
	else {
		for (i = 2; i < 1123400; i++) {
			if (a[i]) {
				cnt = 1;
				while (a[i] >= 0) {
					a[i] -= cnt;
					cnt++;
				}
				ans += cnt - 2;
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: expected primary-expression before 'long'
   18 |         long long t = long long(sqrt(n));
      |                       ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<=(n);++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const double Pi = acos(-1);
const ll mod=1e9+7;
std::vector<ll> Eratosthenes( const ll N )
{
    std::vector<bool> is_prime( N + 1,true);1
    std::vector<ll> P;
    for( ll i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( ll j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}
int main()
{
    ll n;
    cin >> n;
    int ans=0;
    vector<ll> sosu;
    for(auto &xx : Eratosthenes(n)){
        ll x=xx;
        while(n%x==0){
            n/=x;
            x*=xx;
            ans++;
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<long long int> Eratosthenes(ll)':
a.cc:11:46: error: expected ';' before 'std'
   11 |     std::vector<bool> is_prime( N + 1,true);1
      |                                              ^
      |                                              ;
   12 |     std::vector<ll> P;
      |     ~~~                                       
a.cc:21:14: error: expected unqualified-id before '.' token
   21 |             P.emplace_back( i );
      |              ^
a.cc:24:13: error: expected primary-expression before ';' token
   24 |     return P;
      |             ^
Language: Java

import java.util.Scanner;

public class D {


    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
       long n=sc.nextLong();
       long x=(long)Math.sqrt(n);
       long copyx=x;
       long ans=0;
       for(int i=2;i<=x;i++)
       {
           int count=1;
           while(n%((Math.pow(i,count)))==0)
           {

               n= (long) (n/Math.pow(i,count));
               count++;
               ans++;
           }
       }

       if(x==1)
       {
           System.out.println(ans);
       }
       else

       if(n>x)
       {
           System.out.println(1+ans);
       }
       else
       {
           System.out.println(ans);
       }

    }
}


Compiler output:
Main.java:3: error: class D is public, should be declared in a file named D.java
public class D {
       ^
1 error
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long val = scanner.nextLong();
        HashMap<Long, Integer> factors = new HashMap<>();
        for (int i = 2; i <= Math.sqrt(val); i++) {
            while (val % i == 0) {
                factors.compute(i, (k, v) -> v == null ? 1 : v + 1);
                val = val / i;
            }
        }
        if (val != 1) {
            factors.compute(val, (k, v) -> v == null ? 1 : v + 1);
        }

        int result = 0;
        for (Map.Entry<Long, Integer> entry : factors.entrySet()) {
            int current = entry.getValue();
            for (int i = 1; i <= current; i++) {
                current -= i;
                result++;
            }
        }
        System.out.println(result);
    }
}

Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to Long
                factors.compute(i, (k, v) -> v == null ? 1 : v + 1);
                                ^
Main.java:12: error: bad operand types for binary operator '+'
                factors.compute(i, (k, v) -> v == null ? 1 : v + 1);
                                                               ^
  first type:  V
  second type: int
  where V is a type-variable:
    V extends Object declared in class HashMap
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
using namespace std;



vector<long long> f(long long x){
    vector<long long> ans;
   for (long long a = 2; a * a <= x; ++a) {
        if (x % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (x% a == 0) {
            ++ex;
            x /= a;
        }

        // その結果を push
        for(int i = 0;i < ex;i++) ans.push_back(a);
       
    }
    if (x != 1) res.push_back(x);
    
    return ans;
}

void ff(long long x){
    vector<long long> ans;
   for (long long a = 2; a * a <= x; ++a) {
        if (x % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (x% a == 0) {
            cout << " " << x << endl;
            ++ex;
            x /= a;
        }

        // その結果を push
        for(int i = 0;i < ex;i++) ans.push_back(a);
       
    }
    
}



long long g(long long x){
    long long y = 0,count = 0;
    if(x == 1) return 1;
    for(int i = 1;i < x;i++){
        y += i;
        
        if(y > x){
            break;
        }
        else{
            count++;
        }
    }

    return count;
}

int main(){
    long long n,ans = 0;
    cin >> n;
    /**/
    vector <long long > x = f(n);
    vector<long long > y(1000);

    int count = 0;
    y.at(0)++;
    for(int i = 1;i < x.size();i++){
        //cout << " " << x.at(i) << endl;
        if(x.at(i) == x.at(i - 1)){
            y.at(count)++;
        }
        else{
            count++;
            y.at(count)++;
        }
    }

    count = 0;

    while(y.at(count) != 0){
        //cout << y.at(count) << endl;
        
        long long x;

        ans += g(y.at(count));
        //cout << g(y.at(count)) << endl;
        count++;
    }

    if(n == 1) ans = 0;
    cout << ans << endl;

    

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<long long int> f(long long int)':
a.cc:24:17: error: 'res' was not declared in this scope
   24 |     if (x != 1) res.push_back(x);
      |                 ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#define inf 0x3f3f3f3f
using namespace std;
typedef unsigned long long ull;
#define int long long
int n;
int a[1123456];
signed main() {
	long long n;
	cin >> n;
	int i;
	bool bol = false;
	int t = int(sqrt(n));
	if (n == 1) {
		cout << 0 << endl;
		return 0;
	}
	for (i = 2; i <= t; i++) {
		while (n % i == 0) {
			n /= i;
			a[i]++;
			bol = true;
		}
	}
	int ans = 0, cnt;
	if (!bol)cout << 1 << endl;
	else {
		for (i = 2; i < 1123400; i++) {
			if (a[i]) {
				cnt = 1;
				while (a[i] >= 0) {
					a[i] -= cnt;
					cnt++;
				}
				ans += cnt - 2;
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
   11 | #define int long long
      |             ^~~~
a.cc:19:17: note: in expansion of macro 'int'
   19 |         int t = int(sqrt(n));
      |                 ^~~
Language: C++

#include <bits/stdc++.h>

#define llint long long

using namespace std;

signed main() {
	llint n;
	cin >> n;
	llint p = 2;
	llint count = 0;

	vector<llint> primes;

	for(llint i = 2; i * i <= 1000000000000; i++){
		if(n % i != 0){
			continue;
		}

		llint e = 0;
		do{
			e++;
			n /= i;
		}while(n % i == 0);

		llint j = 1;
		while(e >= j){
			e -= j;
			j++;
			count++;
		}
	}
	count += (n / 1000000007);

	cout << count << endl;
}
The 

Compiler output:
a.cc:37:1: error: 'The' does not name a type
   37 | The
      | ^~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;

int main() {
  ll n, nn, ans = 0, d;
  cin >> n;

  vector<pair<ll, ll>> res;
  for (ll a = 2; a * a <= n; ++a) {
    if (n % a != 0) continue;
    ll ex = 0;
    while (n % a == 0) {
      ++ex;
      n /= a;
    }
    res.push_back({a, ex});
  }

  if (n != 1) res.push_back({n, 1});
  // rep(i, res.size()) printf("%d %d\n", res[i].first, res[i].second);

  vector<ll> f(10000001, 0);
  f[1] = 1;
  for (ll i = 2; i <= 10000000; ++i) f[i] = f[i - 1] + i;

  for (int i = 0; i < res.size(); ++i) {
    // int a = lower_bound(f.begin(), f.end(), res[i].second - 1) - f.begin();
    // if (a != res[i].second) a--;
    for (int i = 1; i <= 10000000; ++i)
      if (f[i] <= res[i].second && f[i + 1] > res[i].second) a = i;
    ans += a;
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:62: error: 'a' was not declared in this scope
   34 |       if (f[i] <= res[i].second && f[i + 1] > res[i].second) a = i;
      |                                                              ^
a.cc:35:12: error: 'a' was not declared in this scope
   35 |     ans += a;
      |            ^
Language: C

#include <bits/stdc++.h> 
using namespace std;
int main()
{
	long long a,i=2;
	int cnt=0,ans=0;
	while(a!=1)
	{
		if(a%i==0)
		{
			a/=i;
			ans++;
		}
		i++;
	}
	cout<<ans;
	return 0; 
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
 
#define pi 3.1415926535
 
bool IsPrime(ll num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;
 
    ld sqrtNum = sqrt(num);
    for (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
 
    return true;
}
 
int main()
{
  ll n;
  cin >> n;
  max = sqrt(n);
 
  if(n == 1){
    cout << 0 << endl;
    return 0;
  }
 
  if(IsPrime(n)){
    cout << 1 << endl;
    return 0;
  }
 
  ll ans = 0, a = 0, b = 1;
  while(n % 2 == 0){
    a++;
    if(a == b){
      ans++;
      a = 0; 
      b++;
    }
    n /= 2;
  }
 
  for(ll i = 3; i <= max; i += 2){
    a = 0; 
    b = 1;
    while(n % i == 0){
      a++;
      if(a == b){
        ans++;
        a = 0; 
        b++;
      }
      n /= i;
    }
  }
 
  cout << ans << endl;
 
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:15: error: overloaded function with no contextual type information
   30 |   max = sqrt(n);
      |               ^
a.cc:53:19: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<='
   53 |   for(ll i = 3; i <= max; i += 2){
      |                 ~~^~~~~~
Language: C++


#include <iostream>
#include <math.h> 

bool IsPrime(long long num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    long double sqrtNum /= 2;
    for (long long i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

int main(){
    long long n;
    std::cin >> n;

    long long count = 0;
    long long nmax = n;
    //割れる数字を探す
if(IsPrime(n)){
    std::cout << 1 << std::endl;
    return 0;
}

    for(long long i = 2;i <= n;i++){
        if(n % i == 0){
            n /= i;
            
            count++;
        }
    }

    std::cout << count << std::endl;
}

Compiler output:
a.cc: In function 'bool IsPrime(long long int)':
a.cc:11:25: error: expected initializer before '/=' token
   11 |     long double sqrtNum /= 2;
      |                         ^~
a.cc:12:32: error: 'sqrtNum' was not declared in this scope
   12 |     for (long long i = 3; i <= sqrtNum; i += 2)
      |                                ^~~~~~~
Language: C++

import bisect
N = int(input())

base = pow(N, 1/2)
dic = {}
i = 2
li = []
now = 0
count = 0

for j in range(1, 51):
    now += j
    li.append(now)

while N != 1 and i <= base+10:
    # print(N)
    if N % i == 0:
        dic[i] = 0
        while N % i == 0:
            N /= i
            dic[i] += 1
    i += 1
# print(dic)
if len(dic.keys()) == 0:
    if N == 1:
        print(0)
    else:
        print(1)
else:
    # print(li)
    for d in dic.values():
        # print(d)
        count += bisect.bisect_right(li, d)
    print(count)


Compiler output:
a.cc:16:7: error: invalid preprocessing directive #print
   16 |     # print(N)
      |       ^~~~~
a.cc:23:3: error: invalid preprocessing directive #print
   23 | # print(dic)
      |   ^~~~~
a.cc:30:7: error: invalid preprocessing directive #print
   30 |     # print(li)
      |       ^~~~~
a.cc:32:11: error: invalid preprocessing directive #print
   32 |         # print(d)
      |           ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import bisect
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'i' does not name a type
    6 | i = 2
      | ^
Language: C

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<numeric>
#include<cmath>

std::vector<long long> enum_divisors(long long N) {
    std::vector<long long> res;
    for (long long i = 1; i * i <= N; ++i) {
        if (N % i == 0) {
            res.push_back(i);
            if (N/i != i) res.push_back(N/i);
        }
    }
    std::sort(res.begin(), res.end());
    return res;
}

std::vector<std::pair<long long, long long> > prime_factorize(long long N) {
    std::vector<std::pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0;

        while (N % a == 0) {
            ++ex;
            N /= a;
        }
        res.push_back({a, ex});
    }

    if (N != 1) res.push_back({N, 1});
    return res;
}

int main(void){
    long long N;
    std::cin >> N;
    int cnt=0;

    const auto &res = prime_factorize(N);
    long long pre = 0;

    for (auto p : res) {
        int e=1;
        for (int i = 1; i <= p.second; i+=e){
            e++;
            cnt++;
            //std::cout << p.first << " " << p.second << " " << e << " " << i << " " << cnt << std::endl;
        }
    }

    std::cout << cnt << std::endl;

    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#include <math.h>
using namespace std;

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

void func(double &n, double p, double &c){
  for(double e=1;pow(p,e)<n;e++){
    if(n%pow(p,e)==0){
      n /= pow(p,e);
      c++;
    }
  }
}

int main() {
  double c=0, n, p;
  cin >> n;
  
  for(long int i=p+1;i<sqrt(n);i++){
    if(IsPrime(i)){
      p=i;
      func(n, p, c);
  	}
  }
  cout << c;
}


Compiler output:
a.cc: In function 'void func(double&, double, double&)':
a.cc:27:9: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   27 |     if(n%pow(p,e)==0){
      |        ~^~~~~~~~~
      |        |    |
      |        |    double
      |        double
Language: C++

#include<bits/stdc++.h>
#include <math.h>
using namespace std;

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

void func(long int &n, double p, long int &c){
  for(double e=1;pow(p,e)<n;e++){
    if(n%pow(p,e)==0){
      n /= pow(p,e);
      c++;
    }
  }
}

int main() {
  double c=0, n, p;
  cin >> n;
  
  for(long int i=p+1;i<sqrt(n);i++){
    if(IsPrime(i)){
      p=i;
      func(n, p, c);
  	}
  }
  cout << c;
}


Compiler output:
a.cc: In function 'void func(long int&, double, long int&)':
a.cc:27:9: error: invalid operands of types 'long int' and 'double' to binary 'operator%'
   27 |     if(n%pow(p,e)==0){
      |        ~^~~~~~~~~
      |        |    |
      |        |    double
      |        long int
a.cc: In function 'int main()':
a.cc:41:12: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'double'
   41 |       func(n, p, c);
      |            ^
a.cc:25:21: note:   initializing argument 1 of 'void func(long int&, double, long int&)'
   25 | void func(long int &n, double p, long int &c){
      |           ~~~~~~~~~~^
Language: C++

#include<bits/stdc++.h>
#include <math.h>
using namespace std;

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

void func(long int &n, long int p, long int &c){
  for(int e=1;pow(p,e)<n;e++){
    if(n%pow(p,e)==0){
      n /= pow(p,e);
      c++;
    }
  }
}

int main() {
  long int c=0, n, p;
  cin >> n;
  
  for(long int i=p+1;i<sqrt(n);i++){
    if(IsPrime(i)){
      p=i;
      func(n, p, c);
  	}
  }
  cout << c;
}


Compiler output:
a.cc: In function 'void func(long int&, long int, long int&)':
a.cc:27:9: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   27 |     if(n%pow(p,e)==0){
      |        ~^~~~~~~~~
      |        |    |
      |        |    __gnu_cxx::__promote<double>::__type {aka double}
      |        long int
Language: C++

#include <bits/stdc++.h>
#include <math.h> 
using namespace std;


bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

int main() {
  long long n;
  cin >> n;
  queue<long long> prime;
  if(n == 1) {
    cout << 0;
  }
  else {
  for(int i = 1; i < min(sqrt(n)+10,n); i++) {
    if(IsPrime(i) && n%i == 0) prime.push(i);
  }
  if(prime.empty() == true) {
    prime.push(n);
  }
  int k;
  int ans = 0;
  
  while(prime.empty() == false) {
    int ansk = 0;
    int c = 1;
    k = prime.front();
    prime.pop();
    while(n%k == 0) {
      n/=k;
      ansk++;
    }
    while(ansk >= c){
      ansk -= c;
      c ++;
    }
    ans += c-1;
  }
  cout << ans;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:34:25: error: no matching function for call to 'min(__gnu_cxx::__enable_if<true, double>::__type, long long int&)'
   34 |   for(int i = 1; i < min(sqrt(n)+10,n); i++) {
      |                      ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:34:25: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'long long int')
   34 |   for(int i = 1; i < min(sqrt(n)+10,n); i++) {
      |                      ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:34:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
   34 |   for(int i = 1; i < min(sqrt(n)+10,n); i++) {
      |                      ~~~^~~~~~~~~~~~~~