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

#include <iostream>
#include <map>

using namespace std;
#define ULONGLONG unsigned long long

bool isPrime(unsigned long long N)
{
	if ((N == 0) || (N == 1))
	{
		return false;
	}
	else
	{
		for (unsigned long long i = 2; i < N / 2; ++i)
		{
			if (N % i == 0)
			{
				return false;
			}
		}
		return true;
	}
}

int main()
{
	unsigned long long N;
	cin >> N;

	std::map<unsigned long long, unsigned long long> divisors;
	if (isPrime(N))
	{
		divisors[N] = 1u;
	}
	else
	{
		unsigned long long currentN = N;
		for (unsigned long long i = 2u; i <= N; ++i)
		{
			if ((currentN % i == 0) && isPrime(i))
			{
				unsigned long long count = 0;
				while (currentN % i == 0)
				{
					count++;
					currentN /= i;
				}
				divisors[i] = count;
			}

			if (currentN == 1)
			{
				break;
			}
		}
	}

	ULONGLONG result = 0u;
	for (auto it = divisors.begin(); it != divisors.end(); it++)
	{
		ULONGLONG remaining = it->second;
		ULONGLONG lastValue = 0u;
		ULONGLONG currentValue = 1u;
		while (remaining > lastValue)
		{
			ULONGLONG z = pow(it->first, currentValue);
			N /= z;

			lastValue = currentValue;
			remaining -= currentValue;
			currentValue++;
			result++;
		}
	}

	cout << result << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:39: error: 'pow' was not declared in this scope
   67 |                         ULONGLONG z = pow(it->first, currentValue);
      |                                       ^~~
Language: Java

import java.util.Scanner;
public class MainD{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    Long N = sc.nextLong();
    if(N==1){
      System.out.println(0);
      return;
    }
    int sum = 0;
    Long N2 = N;
    for(Long i=2L; i<100001L; i++){
      // System.out.println(i);
      if(N%i==0){
        sum++;
        N = N/i;
        // System.out.println(N + "N");
      }
    }
    if(sum==0){
      System.out.println(1);
    }else{
      System.out.println(sum);
    }
  }

}  
  





Compiler output:
Main.java:2: error: class MainD is public, should be declared in a file named MainD.java
public class MainD{
       ^
1 error
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;p**e<n;e++){
    if(n%(p**e)==0){
      n /= (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:26:17: error: invalid type argument of unary '*' (have 'int')
   26 |   for(int e=1;p**e<n;e++){
      |                 ^~
a.cc:27:13: error: invalid type argument of unary '*' (have 'int')
   27 |     if(n%(p**e)==0){
      |             ^~
a.cc:28:15: error: invalid type argument of unary '*' (have 'int')
   28 |       n /= (p**e);
      |               ^~
Language: C++

int main(){
    long long n;
    cin >> n;
    long long i_max = sqrt(n);
    vector<int> primes;
    long long c1, c2, count = 0;
    for(long long i=2; i<=i_max; i++){
        c1 = 0;
        c2 = 1;
        while(n % i == 0){
            n /= i;
            c1++;
            if(c1 == c2){
                c1 =0;
                c2++;
                count++;
            }
        }
        primes.push_back(c2);
    }
    if(n != 1 && count == 0) count = 1;
    //for(auto pi:primes) cout << pi;
    cout << count << endl;
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:4:23: error: 'sqrt' was not declared in this scope
    4 |     long long i_max = sqrt(n);
      |                       ^~~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> primes;
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> primes;
      |            ^~~
a.cc:19:9: error: 'primes' was not declared in this scope
   19 |         primes.push_back(c2);
      |         ^~~~~~
a.cc:23:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   23 |     cout << count << endl;
      |     ^~~~
      |     count
a.cc:23:22: error: 'endl' was not declared in this scope
   23 |     cout << count << endl;
      |                      ^~~~
Language: C++

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

int main(){
    long int N;
    cin >> N;
    int count=0;
    for(int p=2;p<=N;p++){
        for(int e=1; 1; e++){
            int z=1;
            for(int i=0; i<e; i++)z*=p;
            if(z>sqrt(N)){
                break;
            }
            if(N%z==0){
                N=N/z;
                count++;
            }
        }
        if(p>sqrt(N)){
            count++;
            break;
        }
    }
    cout << count << endl;
    retunr 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'retunr' was not declared in this scope
   26 |     retunr 0;
      |     ^~~~~~
Language: C++

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

int main(){
	int64_t n; cin >> n;
  	int mod=2;
  	vector<int> A(n/2,0);
    int m=0;
  	int ans =0;
  	while(n !=1){
    	if(n%mod==0){
        	n/=mod;
          	A[m]++;
        }
      	else{
        	m++
        }
    }
  	for(int i=0; i<2/n ;i++){
    	for(int j=1 ; j<20 ; j++){
        	if(A[i]>=j){
            	ans++;
              	A[i]-=j;
            }
          	else{break;}
        }
    }
  	cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: expected ';' before '}' token
   16 |                 m++
      |                    ^
      |                    ;
   17 |         }
      |         ~
Language: C++

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

int main(){
  int N ;
  cin >> N ;
  int n = pow(N,0.5);
  int ans =0;
  vector<int> A(1000000);
  for(int i=2;i<n;i++){
    while(N%i==0) A[i]++;
    N /= i ;
  }
  for(int i=0;i<n;i++){
  if(A[i]>=1&&A[i]<=2) ans++;
  if(A[i]>=3&&A[i]<=5) ans += 2;
  if(A[i]>=6&&A[i]<=9) ans += 3;
  if(A[i]>=10&&A[i]<=14) ans += 4;
  if(A[i]>=15&&A[i]<=20) ans += 5;
  if(A[i]>=21&&A[i]<=27) ans += 6 ;
  if(A[i]>=28>=&&A[i]<=35) ans += 7 ;
  if(A[i]>=36) ans += 8 ;
  }
  
  cout << ans << endl;
  
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |   if(A[i]>=28>=&&A[i]<=35) ans += 7 ;
a.cc:21:19: error: expected ')' before '[' token
   21 |   if(A[i]>=28>=&&A[i]<=35) ans += 7 ;
      |     ~             ^
      |                   )
a.cc:21:18: error: label 'A' used but not defined
   21 |   if(A[i]>=28>=&&A[i]<=35) ans += 7 ;
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define in(x) int x; cin>>x;
#define ll long long int
#define lin(x) ll x; cin>>x;
#define vi vector<int>
#define si set<int>
#define pb push_back
#define re(i,n) for(int i=0; i<n; i++)
#define pe(i,a,b) for(int i=a; i<=b; i++)
#define rre(i,n) for(int i=n-1; i>-1; i--)
#define mp make_pair
#define pii pair<ll,ll>
#define endl "\n"
#define pi 3.1415926536
#define M 1000000007
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

check_prime(long long n)
{
    if(n==1)
        return false;
    bool w=true;
    for(int i=2;i<=sqrt(n);i++)
        if(n%i==0)
            w=false;
    return w;
}

int main ()
{
    FASTIO
    long long n,t,m=0;
    cin>>n;
    t=n;
    if(check_prime(n))
        cout<<1;
    else
    {
        for(int i=2;i<t;i++)
        {
            if(check_prime(i))
            {
                for(int j=1;j<=t;j++)
                {
                    int c=pow(i,j);
                    if(n%c==0)
                    {
                        n/=c;
                        m++;
                    }
                    else break;
                }
            }
            else if(n<i)
                break;
            else continue;
        }
        cout<<m;
    }
}

Compiler output:
a.cc:19:1: error: ISO C++ forbids declaration of 'check_prime' with no type [-fpermissive]
   19 | check_prime(long long n)
      | ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<map>
#include<set>
#include<cmath>
#include<iomanip>
#include<stack>
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define sz(a) (int)a.size()
using namespace std;
ll INF = 1e18;

vector<pair<long long, long long> > res;

int main() {
	ll n;
	cin >> n;
    for (long long i = 2; i * i <= n; ++i) {
        if (n % i == 0) {
            long long ex = 0; // 指数

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

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

    }
    if(n!=1) sz.pb({n,1});
    ll ans = 0;
    rep(i, sz(res)){
        ll ex = res[i].second;
        if (ex >= 66) ans+=11;
        else if (ex >= 55) ans += 10;
        else if (ex >= 45) ans += 9;
        else if (ex >=36) ans += 8;
        else if (ex >= 28) ans += 7;
        else if (ex >= 21) ans += 6;
        else if (ex >= 15) ans += 5;
        else if (ex >= 10) ans += 4;
        else if (ex >= 6) ans += 3;
        else if (ex >= 3) ans += 2;
        else if (ex >= 1) ans += 1;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'sz' was not declared in this scope
   38 |     if(n!=1) sz.pb({n,1});
      |              ^~
Language: C++

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

typedef long long int ll;
typedef long double ld;

#define Pb push_back
#define Mp make_pair

#define ff first
#define ss second

#define Max(x,y,z) max(x,max(y,z))
#define Min(x,y,z) min(x,min(y,z))

#define INF LONG_LONG_MAX
#define MINF LONG_LONG_MIN

#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

#define db1(x) cout<<#x<<" : "<<x<<endl;
#define db2(x,y) cout<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<endl;
#define db3(x,y,z) cout<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<"\t"<<#z<<" : "<<z<<endl;

const int mod = 1e9+7;
const ll N = 1e6+5;
vector<ll> f(N);

void solve()
{
	ll n;
	cin >> n;
	int ans = 0;
	for(int i=2;(i*i)<=n;i++)
	{
		int cnt = 0;
		while(n%i == 0)
		{
			n/=i;
			cnt++;
		}
		ans += (upper_bound(f.begin(),f.end(),cnt)-f.begin())-1;
		if(n < i)	break;
	}
	if(n != 0 && n!=1)	ans++;
	cout << ans;
}

signed main()
{
  	IOS;
  	//freopen("input.txt", "rt", stdin);
  	//freopen("output.txt", "wt", stdout);
  	int t=1;
  	//cin >> t;
	for(int i=1;i<1e6;i++)
	{
		f[i] = i*1LL*(i+1)/2;
	}
	for()
  	while(t--)
  	{
   	solve();
  	}
  	return 0;
}
/*==============================================================================================================================================================*/


Compiler output:
a.cc: In function 'int main()':
a.cc:61:13: error: expected primary-expression before ')' token
   61 |         for()
      |             ^
a.cc:66:9: error: expected primary-expression before 'return'
   66 |         return 0;
      |         ^~~~~~
a.cc:65:10: error: expected ';' before 'return'
   65 |         }
      |          ^
      |          ;
   66 |         return 0;
      |         ~~~~~~
a.cc:66:9: error: expected primary-expression before 'return'
   66 |         return 0;
      |         ^~~~~~
a.cc:65:10: error: expected ')' before 'return'
   65 |         }
      |          ^
      |          )
   66 |         return 0;
      |         ~~~~~~
a.cc:61:12: note: to match this '('
   61 |         for()
      |            ^
Language: C

#define f first
#define s second
#define loop(a,b) for(int i=a;i<b;i++)
#define vi vector<int>
#define vvi vector<vi>
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define ll long long
#define pii pair<int,int>
#define vpii vector<pair<int,int> >
#define loop2(a,b) for(int j=a;j<b;j++)
#define str_in cin.ignore(numeric_limits<streamsize>::max(), '\n')
#define sz(a) int(a.size())
#define displaymatrix(a,m,n) for(int i=0;i<m;i++)\
{for(int j=0;j<n;j++)cout<<a[i][j]<<" ";cout<<endl;}
#define printarray(a,n) for(int i=0;i<n;i++){cout<<a[i]<<" ";}nl;
#define vinput(a,n) vl a(n);loop(0,n)cin>>a[i]
#define ainput(a,n) loop(0,n)cin>>a[i]
#define nl cout << "\n";
//#define all(c) c.begin(),c.end()
#define tr(container,it)\
for(__typeof(container.begin()) it=container.begin();it!=container.end();it++)
#include<bits/stdc++.h>

using namespace std;
int visited[200005];
int parent[200005];
queue<int> bfsq;

const int mod=1e+9+7;

void bfs(vvi& g, int node){
    bfsq.push(node);
    visited[node] = 1;
    while(sz(bfsq) > 0){
        int q = bfsq.front();
        bfsq.pop();
        for (auto x:g[q]){
            if (visited[x]) continue;
            //            cout << q << " " << x << " ";
            bfsq.push(x);
            visited[x] = 1;
            parent[x] = q;
        }
        //        printf("\n");
    }
}

vi pfact(ll n)
{
    int fac = 0;
    int ct = 0;
    vi pow;
    while (n % 2 == 0)
    {
        if (ct == 0) fac++;
        n = n/2;
        ct++;
    }
    pow.pb(ct);
    for (int i = 3; i <= sqrt(n); i = i + 2)
    {
        ct = 0;
        while (n % i == 0)
        {
            if (ct==0)fac++;
            n = n/i;
            ct++;
        }
        pow.pb(ct);
    }
    if (n > 2) {fac++;pow.pb(1);}
    return(pow);
}

void solve(){
    ll n;cin>>n;
    vi pows = pfact(n);
    int ctr = 0;
    int num = 0;
    for (int p:pows){
        while(p>=num+1){
            ctr++;
            num++;
            p -= num;
        }
        num = 0;
    }
    cout << ctr << endl;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    int t=1;
    //    cin>>t;
    while(t--) solve();
    return 0;
}




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

import java.util.*;
 
public class Main {
	public static void main(String args[] ) throws Exception {
		
		Scanner sc = new Scanner(System.in);
		long N = Long.valueOf ( sc.nextLine().trim() ) ;

		BitSet bs = createPrimes ( 1000000 ) ; 
		List<Integer> primes = new ArrayList<>();
		for ( int p=bs.nextSetBit(0) ;p>=0 ; p=bs.nextSetBit(p+1) )
			primes.add ( p ) ;

		Map<Long,Integer> map = createFactors ( N , primes ) ;
		int cnt = 0 ;
		for ( long p : map.keySet() ) {
			long v = p ;
			while ( N % v ==0 ) {
				cnt += 1; 
				N /= v ;
				v *= p ;
			}
		}
		System.out.println( cnt ) ;
		
	 }
	public static BitSet createPrimes( int n ){
		BitSet bs = new BitSet();
		bs.set( 2, n ) ;
		for ( int i=bs.nextSetBit(0) ; i>=0 ; i=bs.nextSetBit(i+1) ){
			if ( (long) i * i > bs.length() ) break;
			for ( int k=2 ; (long)k*i < bs.length() ; k++ )
				bs.clear(k*i);
		}



Compiler output:
Main.java:34: error: reached end of file while parsing
		}
		 ^
1 error
Language: Java

import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            long n = Long.parseLong(sc.next());
            Map<Long, Integer> prime = new HashMap<>(); 

            int ans = 0;

            if(n == 1) System.out.println(ans);
            else{
                boolean isFirst = true;
                while(n%2 == 0){
                    n /= 2;
                    if(isFirst){
                        prime.put((long)2, 1);
                        isFirst = false;
                    }else{
                        prime.replace((long)2, prime.get(2) + 1);
                    }
                }
                
                long devide = 3;
                while(n != 1){
                    if(n%devide == 0){
                        if(!prime.containsKey(devide)) prime.put(devide, 1);
                        else prime.replace(devide, prime.get(devide) + 1); 
                        n /= devide;
                    }else{
                        devide += 2;
                    }
                }

                for(Integer value: prime.values()){
                    if(value == 1){
                        ans += 1;
                    }else{
                        int minus = 1;
                        while(value >= minus){
                            value -= minus;
                            ans++;
                            minus++;
                        }
                    }
                }    

            }

            System.out.prinln(ans);
            
        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Compiler output:
Main.java:53: error: cannot find symbol
            System.out.prinln(ans);
                      ^
  symbol:   method prinln(int)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.*;

public class Main{

  public static long d(long num){
    long ans=0;
    while(true){
      long i=1;
      if(num-i>=0){
        ans++;
      }else{
        break;
      }
      i++;
    }
    return ans;
  }
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	long n=sc.nextLong(),x=n,sum=0;
    List<long> soinsu=new ArrayList<long>();
    Map<long,long> map=new HashMap<long,long>();
    for(long i=2;i<n;){
      if(x%i==0){
        list.add(i);
        x/=i;
        if(map.get(i)==null){
          map.set(i,(long)1);
        }else{
          map.set(i,map.get(i)+1);
        }
      }else{i++;}
    }
    for(long key:map.keySet()){
      sum+=d(map.get(key));
    }
  }
}


Compiler output:
Main.java:21: error: unexpected type
    List<long> soinsu=new ArrayList<long>();
         ^
  required: reference
  found:    long
Main.java:21: error: unexpected type
    List<long> soinsu=new ArrayList<long>();
                                    ^
  required: reference
  found:    long
Main.java:22: error: unexpected type
    Map<long,long> map=new HashMap<long,long>();
        ^
  required: reference
  found:    long
Main.java:22: error: unexpected type
    Map<long,long> map=new HashMap<long,long>();
             ^
  required: reference
  found:    long
Main.java:22: error: unexpected type
    Map<long,long> map=new HashMap<long,long>();
                                   ^
  required: reference
  found:    long
Main.java:22: error: unexpected type
    Map<long,long> map=new HashMap<long,long>();
                                        ^
  required: reference
  found:    long
Main.java:25: error: cannot find symbol
        list.add(i);
        ^
  symbol:   variable list
  location: class Main
7 errors
Language: Java

import java.util.*;

public class Main{

  public static long d(long num){
    long ans=0;
    while(true){
      long i=1;
      if(num-i>=0){
        ans++;
      }else{
        break;
      }
      i++;
    }
    return ans;
  }
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	long n=sc.nextLong(),x=n,sum=0;
    List<Long> soinsu=new ArrayList<Long>();
    Map<Long,Long> map=new HashMap<Long,Long>();
    for(long i=2;i<n;){
      if(x%i==0){
        list.add(i);
        x/=i;
        if(map.get(i)==null){
          map.set(i,(long)1);
        }else{
          map.set(i,map.get(i)+1);
        }
      }else{i++;}
    }
    for(long key:map.keySet()){
      sum+=d(map.get(key));
    }
  }
}


Compiler output:
Main.java:25: error: cannot find symbol
        list.add(i);
        ^
  symbol:   variable list
  location: class Main
Main.java:28: error: cannot find symbol
          map.set(i,(long)1);
             ^
  symbol:   method set(long,long)
  location: variable map of type Map<Long,Long>
Main.java:30: error: cannot find symbol
          map.set(i,map.get(i)+1);
             ^
  symbol:   method set(long,long)
  location: variable map of type Map<Long,Long>
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define TEST int t = 1; while(t--) solve()


int any(int n)
{
	 int l=1;
	 int r=2*sqrt(n);
	 int ans=1;
	 while(l<=r)
	 {
	 	 int m=(l+r)/2;
	 	 int t=m*(m+1);
	 	 t/=2;
	 	 if(t<=n)
	 	 {    
	 	 	 l=m+1;
	 	 	 ans=m;

	 	 }
	 	 else
	 	 {
	 	 	 r=m-1;
	 	 }
	 }

	 return ans;
}

void dit(map<int,int> &a,int n)
{
	 while(n%2==0)
	 {
	 	 a[2]++;
	 	 n/=2;
	 }

	 for(int i=3;i*i<=n;i++)
	 {
	 	 if(n%i==0)
	 	 {
	 	 	 while(n%i==0)
	 	 	 {
	 	 	 	 a[i]++;
	 	 	 	 n/=i;
	 	 	 }
	 	 }
	 }

	 if(n>1)
	 {
	 	 a[n]++;
	 }


}

void solve(){
    
   int n;
   cin>>n;
   if(n<=1)
   {
   	 cout<<0<<"\n";
   	 return;
   }
   map<int,int> g;
   dit(g,n);
   int ans=0;
   for(auto x:g)
   	 {
   	 	int p=any(x.second);
   	 	ans+=p;
   	 }

   	 cout<<ans<<"\n";
}

signed main(){
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL); TEST; return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:74:23: error: reference to 'any' is ambiguous
   74 |                 int p=any(x.second);
      |                       ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:77,
                 from a.cc:1:
/usr/include/c++/14/any:81:9: note: candidates are: 'class std::any'
   81 |   class any
      |         ^~~
a.cc:7:5: note:                 'long long int any(long long int)'
    7 | int any(int n)
      |     ^~~
Language: Java

import java.util.*;

public class Main{

  public long d(long num){
    long ans=0;
    while(true){
      long i=1;
      if(num-i>=0){
        ans++;
      }else{
        break;
      }
      i++;
    }
    return ans;
  }
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	long n=sc.nextLong(),x=n,sum=0;
    List<Long> soinsu=new ArrayList<Long>();
    Map<Long,Long> map=new HashMap<Long,Long>();
    for(int i=2;i<n;){
      if(x%i==0){
        list.add(i);
        x/=i;
        if(map.get(i)==null){
          map.set(i,1);
        }else{
          map.set(i,map.get(i)+1);
        }
      }else{i++;}
    }
    for(long key:map.keySet()){
      sum+=d(map.get(key));
    }
  }
}


Compiler output:
Main.java:25: error: cannot find symbol
        list.add(i);
        ^
  symbol:   variable list
  location: class Main
Main.java:28: error: cannot find symbol
          map.set(i,1);
             ^
  symbol:   method set(int,int)
  location: variable map of type Map<Long,Long>
Main.java:30: error: cannot find symbol
          map.set(i,map.get(i)+1);
             ^
  symbol:   method set(int,long)
  location: variable map of type Map<Long,Long>
Main.java:35: error: non-static method d(long) cannot be referenced from a static context
      sum+=d(map.get(key));
           ^
4 errors
Language: C++

#include<iostream>

using namespace  std;

int main()
{
    unsigned long long N, N_original, times = 0;
    cin >> N;
    N_original = N;
    int r = sqrt(N)+1;
    for(int i=2; i<=r; ++i){
        unsigned long long curr = 1;

        while (N%i == 0){

            bool ok = true;
            for(unsigned long long j=0; j<curr; ++j){

                if(N%i == 0){
                    N = N / i;
                }
                else {
                  ok = false;
                }
            }
            if(ok) times++;

            curr++;
        }
    }
    if(N_original == N && N>= 2){
        cout << 1 << endl;
    } else {
        cout << times << endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'sqrt' was not declared in this scope
   10 |     int r = sqrt(N)+1;
      |             ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std; 
typedef long long int ll; 
#define FOR(i,l,r) for(i=l;i<r;i++) 
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll> 
#define F first 
#define S second
signed main(){
  ll N,i,ans=0,p=2;cin>>N;
  while(N=>p*p){
    while(N%p!=0&&N>p*p)p++;
    if(N%p==0){
      ll e=0;
      while(N%p==0){e++;N/=p;}
      ans+=(-1+sqrt(8*e+1))/2;
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '>' token
   12 |   while(N=>p*p){
      |           ^
Language: Java

import java.util.*;

public class Main{

  public long d(long num){
    long ans=0;
    while(true){
      long i=1;
      if(num-i>=0){
        ans++;
      }else{
        break;
      }
      i++;
    }
    return ans;
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	long n=sc.nextLong(),x=n,sum=0;
    List<Long> soinsu=new ArrayList<Long>();
    Map<Long,Long> map=new HashMap<Long,Long>();
    for(int i=2;i<n;){
      if(){
        list.add(i);
        x/=i;
        if(map.get(i)==null){
          map.set(i,1);
        }else{
          map.set(i,map.get(i)+1);
        }
      }else{i++;}
    }
    for(long key:map.keySet()){
      sum+=d(map.get(key));
    }
  }
}


Compiler output:
Main.java:17: error: illegal start of expression
  public static void main(String[] args){
  ^
Main.java:23: error: illegal start of expression
      if(){
         ^
2 errors
Language: Java

import java.util.*;
public class Main 
{
	public static void main(String[] args)
    {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextLong();
        int z = 0;
        boolean boo = false;
      int count = 0;
        for(int i = 0; i < a; i++)
        {
           if(a%i  == 0)
             boo = true;
          if(Math.pow(i+1, i)==a)
            count++;
             
        }
        System.out.println(count);
	}
}

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from long to int
		int a = sc.nextLong();
		                   ^
1 error
Language: C

#include <stdio.h>

int main(void)
{
    int x,i,p,sizensuu;
    double zissuu;

    scanf("%d",&x);
    for(i=2;1;i++){
        p=i;
        if(i>x)(break;)
        do{
            sizensuu=x/i;
            zissuu=x/i;
            i++;

        } while(zissuu==sizensuu);
        x=sizensuu;
        i=p;
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected expression before 'break'
   11 |         if(i>x)(break;)
      |                 ^~~~~
main.c:11:24: error: expected ';' before 'do'
   11 |         if(i>x)(break;)
      |                        ^
      |                        ;
   12 |         do{
      |         ~~
Language: C++


#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

// rep(i, 100) { cout << i << endl; } => 0 1 2 ... 99
#define rep(i, n) for(int i = 0, i##_len = (n); i < (int)n; i++)

// std::sort(all(v));
#define all(x) (x).begin(), (x).end()

// long long int
using ll = long long;

// utility to cast return value of size function to int
#define SZ(x) ((int)(x).size())

// VS defines "_DEBUG" macro when debug configuration.
#if _DEBUG
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#else
#define dump(x)
#define debug(x)
#endif

// update max
template<class T>bool chmax(T & prov, const T & cur)
{
	if (cur > prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

// update min
template<class T>bool chmin(T & prov, const T & cur)
{
	if (cur < prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

int main()
{
	ll N;
	cin >> N;

	ll ans = 0;

	const ll upper_limit = std::sqrtl(N) + 1;

	ll n = N;
	bool is_prime = true;
	for (ll p = 2; p < upper_limit && p <= n; p++)
	{
		int power_count = 0;
		while (n % p == 0)
		{
			is_prime = false;
			power_count++;
			n /= p;
		}
		int e_count = 0;
		for (;;)
		{
			if (power_count >= e_count + 1)
			{
				e_count++;
				power_count -= e_count;
			}
			else
			{
				break;
			}
		}
		ans += e_count;
	}

	if (is_prime)
	{
		cout << 1 << endl;
	}
	else
	{
		cout << ans << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:37: error: 'sqrtl' is not a member of 'std'; did you mean 'strtol'?
   63 |         const ll upper_limit = std::sqrtl(N) + 1;
      |                                     ^~~~~
      |                                     strtol
Language: C++


#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

// rep(i, 100) { cout << i << endl; } => 0 1 2 ... 99
#define rep(i, n) for(int i = 0, i##_len = (n); i < (int)n; i++)

// std::sort(all(v));
#define all(x) (x).begin(), (x).end()

// long long int
using ll = long long;

// utility to cast return value of size function to int
#define SZ(x) ((int)(x).size())

// VS defines "_DEBUG" macro when debug configuration.
#if _DEBUG
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#else
#define dump(x)
#define debug(x)
#endif

// update max
template<class T>bool chmax(T & prov, const T & cur)
{
	if (cur > prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

// update min
template<class T>bool chmin(T & prov, const T & cur)
{
	if (cur < prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

int main()
{
	ll N;
	cin >> N;

	ll ans = 0;

	const ll upper_limit = std::sqrt((double)N) + 1;

	ll n = N;
	bool is_prime = true;
	for (ll p = 2; p < upper_limit && p <= n; p++)
	{
		int power_count = 0;
		while (n % p == 0)
		{
			is_prime = false;
			power_count++;
			n /= p;
		}
		int e_count = 0;
		for (;;)
		{
			if (power_count >= e_count + 1)
			{
				e_count++;
				power_count -= e_count;
			}
			else
			{
				break;
			}
		}
		ans += e_count;
	}

	if (is_prime)
	{
		cout << 1 << endl;
	}
	else
	{
		cout << ans << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:37: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   63 |         const ll upper_limit = std::sqrt((double)N) + 1;
      |                                     ^~~~
      |                                     sort
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>  
#include <functional>
#define ll long long int
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define mod 1000000007
#define MAX 1000000
#define endl '\n'
#define mp make_pair
#define INF 1000000000
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ff first
#define ss second
#define ps(x,y) fixed<<setprecision(y)<<x
#define setbits(x) __builtin_popcountll(x)			//counts no of ones in binary representation
#define w(t) 	int t; cin>>t; while(t--)
#define pi 3.141592653589793238
#define sortt(v)  sort(v.begin(),v.end())
#define lb(v,x) std::lower_bound(v.begin(),v.end(),x)
#define ub(v,x) std::upper_bound(v.begin(),v.end(),x)

using namespace std;
 
 bool isprime(ll n){			//to check whteher no is prime or not
	if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
  
    // This is checked so that we can skip 
    // middle five numbers in below loop 
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (int i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
  
    return true; 
}

int main() {
	fast;
	ll n;
	cin>>n;
	if(isprime(n)){
		cout<<1;
		return 0;
	}
	vector<ll> ref;
	ref.pb(0);
	for(ll i=1;i<=sqrt(n)+50;i++){
		ll p=i*(i+1);
		p/=2;
		ref.pb(p);
	}
	vector<ll>::iterator it1,it2;
	ll temp=sqrt(n);
	ll cnt=0;
	vector<ll> v(temp+50,0);
	while(n%2==0){
		n/=2;
		cnt++;
	}
	v[2]=cnt;
	cnt=0;
	temp=sqrt(n);
	for(ll i=3;i<=temp;i+=2){
		
			while(n%i==0){
				n/=i;
				cnt++;
			}
			v[i]=cnt;
			cnt=0;
		
	}
	if(n>2)	v[n]++;
	ll ans=0;
	for(ll i=2;i<temp+50;i++){
		if(v[i]==0)	continue;
		else{
			it1=lb(ref,v[i]);
			it2=ub(ref,v[i]);
			if(it1!=it2){
				ans+=(it1-ref.begin());
			}
			else{
				ans+=(it1-ref.begin());
				ans--;
			}
		}
	}
	cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:13: error: 'class std::vector<long long int>' has no member named 'pb'
   52 |         ref.pb(0);
      |             ^~
a.cc:56:21: error: 'class std::vector<long long int>' has no member named 'pb'
   56 |                 ref.pb(p);
      |                     ^~
Language: C++


#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

// rep(i, 100) { cout << i << endl; } => 0 1 2 ... 99
#define rep(i, n) for(int i = 0, i##_len = (n); i < (int)n; i++)

// std::sort(all(v));
#define all(x) (x).begin(), (x).end()

// long long int
using ll = long long;

// utility to cast return value of size function to int
#define SZ(x) ((int)(x).size())

// VS defines "_DEBUG" macro when debug configuration.
#if _DEBUG
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#else
#define dump(x)
#define debug(x)
#endif

// update max
template<class T>bool chmax(T & prov, const T & cur)
{
	if (cur > prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

// update min
template<class T>bool chmin(T & prov, const T & cur)
{
	if (cur < prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

int main()
{
	ll N;
	cin >> N;

	ll ans = 0;

	const ll upper_limit = std::sqrt(N) + 1;

	ll n = N;
	bool is_prime = true;
	for (ll p = 2; p < upper_limit && p <= n; p++)
	{
		int power_count = 0;
		while (n % p == 0)
		{
			is_prime = false;
			power_count++;
			n /= p;
		}
		int e_count = 0;
		for (;;)
		{
			if (power_count >= e_count + 1)
			{
				e_count++;
				power_count -= e_count;
			}
			else
			{
				break;
			}
		}
		ans += e_count;
	}

	if (is_prime)
	{
		cout << 1 << endl;
	}
	else
	{
		cout << ans << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:37: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   63 |         const ll upper_limit = std::sqrt(N) + 1;
      |                                     ^~~~
      |                                     sort
Language: C++


#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

// rep(i, 100) { cout << i << endl; } => 0 1 2 ... 99
#define rep(i, n) for(int i = 0, i##_len = (n); i < (int)n; i++)

// std::sort(all(v));
#define all(x) (x).begin(), (x).end()

// long long int
using ll = long long;

// utility to cast return value of size function to int
#define SZ(x) ((int)(x).size())

// VS defines "_DEBUG" macro when debug configuration.
#if _DEBUG
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#else
#define dump(x)
#define debug(x)
#endif

// update max
template<class T>bool chmax(T & prov, const T & cur)
{
	if (cur > prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

// update min
template<class T>bool chmin(T & prov, const T & cur)
{
	if (cur < prov)
	{
		prov = cur;
		return true;
	}
	return false;
}

int main()
{
	ll N;
	cin >> N;

	ll ans = 0;

	const ll upper_limit = sqrt(N) + 1;

	ll n = N;
	bool is_prime = true;
	for (ll p = 2; p < upper_limit && p <= n; p++)
	{
		int power_count = 0;
		while (n % p == 0)
		{
			is_prime = false;
			power_count++;
			n /= p;
		}
		int e_count = 0;
		for (;;)
		{
			if (power_count >= e_count + 1)
			{
				e_count++;
				power_count -= e_count;
			}
			else
			{
				break;
			}
		}
		ans += e_count;
	}

	if (is_prime)
	{
		cout << 1 << endl;
	}
	else
	{
		cout << ans << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:32: error: 'sqrt' was not declared in this scope
   63 |         const ll upper_limit = sqrt(N) + 1;
      |                                ^~~~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
template <typename T> 
using lim = numeric_limits<T>;
template <typename T>
using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using indexed_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

ll solve(ll x){
    ll lo = 0;
    ll hi = 1e9;
    ll ans = 0;
    while(lo <= hi){
        ll mid = hi - (hi-lo)/2;
        if (mid*(mid+1)/2 <= x){
            ans = mid;
            lo = mid+1;
        }
        else hi = mid-1;
    }
    return ans;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    unordered_map<ll, ll> factorized;
    for (ll i = 2; i*i <= n; i++){
        while(n%i == 0){
            n/=i;
            factorized[i]++;
        }
    }
    if (n > 1) factorized[n]++;

    ll ans = 0;
    for (auto it = factorized.begin(); it != factorized.end(); it++){
        ans += solve(it.second);
    }
    cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:25: error: 'struct std::__detail::_Node_iterator<std::pair<const long long int, long long int>, false, false>' has no member named 'second'
   61 |         ans += solve(it.second);
      |                         ^~~~~~
Language: C++

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

int main() {
	long long N;
	cin >> N;
	long long i = 2;
	map<long long, int> Nums;
	while (i <= (long long)sqrt(N)) {
		while (N % i == 0) {
			Nums[i]++;
			N /= i;
		}
		i++;
	}
	if (N > 1) Nums[N]++;

	int ans = 0;
	for (auto p : Nums) {
		int now = 1;
		int num = p.second;
		while (num >= now) {
			num -= now;
			now++;
			ans++;
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: 'sqrt' was not declared in this scope
   10 |         while (i <= (long long)sqrt(N)) {
      |                                ^~~~
Language: C++

#include<bits/stdc++.h>
#define int long long
#define ld long double
#define ri register int
#define il inline
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define pii pair<int,int>
#define vi vector<int>
#define all(x) x.begin(),x.end() 
#define rep(i,a,b) for(ri i=(a);i<=(b);++i)
#define per(i,a,b) for(ri i=(a);i>=(b);--i)
#define ls (x<<1)
#define rs (x<<1|1)
#define mid (l+r>>1)
#define db(x) cout << "#x:" << x << endl
#define dd() cout << "Out put!\n"
const int mod=1e9+7,eps=1e-6,pi=acos(-1.0),maxn=1000010;
const int inf=0x7f7f7f7f7f7f7f7f;
using namespace std;
int a[maxn],b[maxn],c[maxn];
string s; 
il check(int x)
{
	if(x <= 3)
		return x;
	for(int i=2;i<=sqrt(x);i++)
	{
		if(x%i==0)
			return i;
	}
	return x;
}
signed main()
{
	int n;
	cin >> n;
	int ans = 0;
	if(n==1)
	{
		cout << 0;
		return 0;
	}
	if(n<=5)
	{
		cout << 1;
		return 0;
	}
	while(n)
	{
		int p = check(n);
	//	cout << p << endl;
		if(p==0||n==1)
		{
			cout << ans;
			return 0;
		}
		int cnt = 0;
		while(n%p==0)
		{
			n/=p;
			cnt++;
		//	cout << p<< " " <<n << endl;
		}
		int k = 1;
		while(cnt)
		{
			if(cnt >= k)
				cnt-=k,ans++,k++;
			else
				cnt=0;
		}
	}
	return 0;
}

Compiler output:
a.cc:25:4: error: ISO C++ forbids declaration of 'check' with no type [-fpermissive]
   25 | il check(int x)
      |    ^~~~~
Language: C++

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

ls = factorization(N)

ans = 0
for p,e in ls:
    i = 1
    if p != 1:
        while e-i >= 0:
            e -= i
            i += 1
            ans += 1
print(ans)


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

import java.util.*
fun readint()=readLine()!!.toInt()
fun readll()=readLine()!!.toLong()
fun readstring()=readLine()!!
fun readlint()=(readLine()!!.split(" ").map{it.toInt()}).toIntArray()
fun readlll()=(readLine()!!.split(" ").map{it.toLong()}).toLongArray()

fun solve() {
    var A = readll();
    var cur = 2L;
    var ans = 0;
    while (cur * cur <= A) {
        if (A % cur != 0L) {
            cur++;
            continue;
        }
        var cnt = 0;
        while (A % cur == 0L) {
            A /= cur;
            cnt++;
        }
        var nd = 1;
        while(cnt >= nd) {
            ans++;
            cnt -= nd;
            nd++;
        }
    }
    if (A > 1) {
        ans++;
    }
    println(ans)
}
fun main(args: Array<String>) {
    val t = 1;
    repeat(t) {
        solve();
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:56: error: expected unqualified-id before ')' token
    5 | fun readlint()=(readLine()!!.split(" ").map{it.toInt()}).toIntArray()
      |                                                        ^
a.cc:6:56: error: expected unqualified-id before ')' token
    6 | fun readlll()=(readLine()!!.split(" ").map{it.toLong()}).toLongArray()
      |                                                        ^
a.cc:34:1: error: 'fun' does not name a type
   34 | fun main(args: Array<String>) {
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int primedivisors(ll n){
    int ans=0;
    for(ll i=2;i<=sqrt(n);i++){
        if(n%i==0){
            ans++;
            while(n%i==0)n/=i;
        }
    }
    if(x!=1)ans++;
    return ans;
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
	ll n;
	cin>>n;
	cout<<primedivisors(n);
}


Compiler output:
a.cc: In function 'int primedivisors(ll)':
a.cc:12:8: error: 'x' was not declared in this scope
   12 |     if(x!=1)ans++;
      |        ^
Language: C

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

#define MAX 1000005
vector<int> primes;
bool isprime[MAX];

void sieve(int n){
	memset(isprime, true, sizeof(isprime));
	isprime[0] = isprime[1] = false;
	int p;
	for( p=2; p*p<=n; p++){
		if(isprime[p]){
			primes.push_back(p);
			for(int i=p*2; i<=n;i+=p){
				isprime[i] = false;
			}
		}
	}
	for(int i=p; i<=n;i++){
		if(isprime[i]) primes.push_back(i);
	}
}



typedef long long int ll;

int main(){
	sieve(MAX);
	int n; cin>>n;
	int ans = 0;
	for(auto x: primes){
		int v =x;
		int p = 1;
		while(n%(int)(pow(v,p))==0){
			n/=(int)pow(v,p);
			p+=1;
			ans+=1;
		}
	}
	if (n>1) ans++;
	printf("%d",ans);
}


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 <iostream>
#include <vector>
using namespace std;
typedef long long ll;

vector<ll> enum_prime(int n){   // containing n
    vector<ll> res;
    if (n <= 1) return res;
    vector<bool> p(n + 1);
    fill(p.begin() + 2, p.end(), true);
    for(int i = 2; i <= n; i++){
        if(p[i]){
            res.push_back(i);
            for(int j = i * 2; j <= n; j += i) p[j] = false;
        }
    }
    return res;
}

int main()
{
    ll n;
    cin >> n;
    vector<ll> prime = enum_prime(1000000);
    vector<int> v;
    for(ll p : prime){
        int l = 0;
        while(n % p == 0){
            n /= p;
            l++;
        }
        if(l) v.push_back(l);
    }
    if(n != 1) v.push_back(1);
    int s[30];
    s[0] = 0;
    for(int i = 1; i < 30; i++) s[i] = s[i - 1] + i;
    int ans = 0;
    for(int x : v){
        int r = upper_bound(s, s + 30, x) - s - 1;
        ans += r;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:17: error: 'upper_bound' was not declared in this scope
   40 |         int r = upper_bound(s, s + 30, x) - s - 1;
      |                 ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define pii pair<int, int>
#define fst first
#define snd second
#define pub push_back
#define vi vector<int>
#define ll long long

using namespace std;

int main()
{
	ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
	long long n, res = 0; cin >> n;
	for (int i = 2; i * i <= n; i++)
	{
		ll to = 0;
		while (n % i == 0)
		{
			to++;
			n /= i;
		}
		if (to)
		{
			int val = sqrt(2 * to);
			if (val * (val + 1) > 2 * to) {val--;}
			res += val;
		}
	}
	if (n > 1) {res++;}
	cout << res << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:35: error: 'sqrt' was not declared in this scope
   27 |                         int val = sqrt(2 * to);
      |                                   ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,s,n) for(int i = s; i < n; i++)
#define INF 1000000007
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
ll ceil(const ll a, const ll b) { return (a + b - 1) / b; }
map< int64_t, int > prime_factor(int64_t n) {
  map< int64_t, int > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
int main(){
  ll n;
  cin >> n;
  map<ll,int>ans = prime_factor(n);
  ll an = 0;
  for(auto i : ans){
    ll ok = 1,cnt = 0;
    while(ok <= i.second){
      i.second -= ok;
      ok++;
      cnt++;
    }
    an += cnt;
  }
  cout << an << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:32: error: conversion from 'map<long int,[...]>' to non-scalar type 'map<long long int,[...]>' requested
   25 |   map<ll,int>ans = prime_factor(n);
      |                    ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    
    long long int n, i, dap++;
    cin>>n;
    for(i=2;i<=1000000;i++)
    {
        if(n%i==0)
        dap++;
        while(n%i==0)
        n/=i;
    }
    if(n>1)
    dap++;
    cout<<dap;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected initializer before '++' token
    7 |     long long int n, i, dap++;
      |                            ^~
a.cc:12:9: error: 'dap' was not declared in this scope; did you mean 'dup'?
   12 |         dap++;
      |         ^~~
      |         dup
a.cc:17:5: error: 'dap' was not declared in this scope; did you mean 'dup'?
   17 |     dap++;
      |     ^~~
      |     dup
a.cc:18:11: error: 'dap' was not declared in this scope; did you mean 'dup'?
   18 |     cout<<dap;
      |           ^~~
      |           dup
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    
    long long int n, i, dap++;;
    cin>>n;
    for(i=2;i<=1000000;i++)
    {
        if(n%i==0)
        dap++;
        while(n%i==0)
        n/=i;
    }
    if(n>1)
    dap++;
    cout<<dap;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected initializer before '++' token
    7 |     long long int n, i, dap++;;
      |                            ^~
a.cc:12:9: error: 'dap' was not declared in this scope; did you mean 'dup'?
   12 |         dap++;
      |         ^~~
      |         dup
a.cc:17:5: error: 'dap' was not declared in this scope; did you mean 'dup'?
   17 |     dap++;
      |     ^~~
      |     dup
a.cc:18:11: error: 'dap' was not declared in this scope; did you mean 'dup'?
   18 |     cout<<dap;
      |           ^~~
      |           dup