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

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
unordered_map<ll,ll> mp;
void primes(ll n)
{
  while(n%2==0)
  {
    mp[2]++;
    n=n/2;
  }
  for(ll i=3;i*i<=n;i=i+2)
  {
    while(n%i==0)
    {
      mp[i]++;
      n=n/i;
    }
  }
  if(n>2)
    mp[n]++;

}
int main()
{
  ll n;
  cin>>n;
  primes();
  ll ans=0;
  for(const auto& m: mp)
  {
    ll k=1;
    while((m.second*2)/(k*(k=1))>1)
    {
      ans++;
      k++;
    }
    ans=k-1;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: too few arguments to function 'void primes(long long int)'
   28 |   primes();
      |   ~~~~~~^~
a.cc:5:6: note: declared here
    5 | void primes(ll n)
      |      ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <vector>
#define rep(i,n) for (int i = 0;i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

struct Linear_Sieve{
int n;
vector<int> lp,primes;
//lp[i]...the least prime of i. primes...prime numbers
Linear_Sieve(int n = 1):n(n),lp(n+1){
    for(int i = 2;i < n+1;i++){
        if(lp[i] == 0) {
            primes.push_back(i);
            lp[i] = i;
        }
        for(int j = 0;j<primes.size() && primes[j] <= lp[i] && i*primes[j] < n+1; ++j) lp[i*primes[j]] = primes[j];
    }
}
bool isPrime(int x) {return lp[x] == x;}

vector<int> factorList(int x){
    //make list which contains prime factors of x. Ans it toralates multipled components.
    vector<int> res;
    while(x != 1){
        res.push_back(lp[x]);
        x /= lp[x];
    }
    return res;
}

vector<pair<int,int>> factor(int x){
        //make list of pairs which couple prime factor and multiplicity.
    vector<int> fl = factorList(x);
    if(fl.size() == 0) return{};
    vector<pair<int,int>> res(1,pair<int,int>(fl[0],0));
    for(int p : fl){
        if(res.back().first == p){
            res.back().second++;
        }else{
            res.emplace_back(p,1);
        }
    }
    return res;
}
};


//     auto find_m = [&](int k){
//         for(int m = 1;m <= k;m++){
//             if(m*(m+1)/2 <= k && k < (m+1)*(m+2)/2 ) return m;
//         }
//         return -1;
//     };

//     ll n;
//     cin >> n;
//     vector<int> s(n);
//     set<ll> p;
//     while(true){
//         int rootn = sqrt(n) + 0.8;
//         bool flag = true;
//         for(int i = 2;i <= rootn;i++){
//             if(n%i == 0) {
//                 s[i] += 1;
//                 p.insert(i);
//                 n /= i;
//                 flag = false;
//                 break;
//             }
//         }
        
//         if(flag){
//             if(n > 1){
//                 s[n]++;
//                 p.insert(n);
//             }
//             break;
//         }
//     }

//     int ans = 0;
// for(auto itr = p.begin(); itr != p.end(); ++ itr){
//     ans += find_m(s[*itr]);
// }
// cout << ans << endl;

int main() {
  ll n;
  cin >> n;
  Sieve s(1000005);
  auto fs = s.factor(n);
  int ans = 0;
  for (auto p : fs) {
    int x = p.second;
    int b = 1;
    while (b <= x) {
      x -= b;
      b++;
      ++ans;
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:93:3: error: 'Sieve' was not declared in this scope
   93 |   Sieve s(1000005);
      |   ^~~~~
a.cc:94:13: error: 's' was not declared in this scope; did you mean 'fs'?
   94 |   auto fs = s.factor(n);
      |             ^
      |             fs
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n,ans=0,i=2;
  cin >> n;
  while(n!=1){
  	if(n%i == 0){
    	n /= i;
      ans++;
    }
    i++
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected ';' before '}' token
   12 |     i++
      |        ^
      |        ;
   13 |   }
      |   ~
Language: C


#include<stdio.h>
#include<math.h>

int isprime(int x)
{
  	int i,l=pow(x,0.5);
  	for(i=2;i<=l;++i)
    {
      if(x%i==0)
        return 0;
    }
  return 1;
}


int main()
{
  	int n,c=0;
  	scanf("%d",&n);
  	if(isprime(n))
      printf("1");
  	else
    {
      	for(i=2;i<=n/2;++i)
        {
          	if(n%i==0)
            {
              n/=i;
              ++c;
            }
          if(n==1)
            break;
        }
      printf("%d",c);
    }
}

Compiler output:
main.c: In function 'main':
main.c:25:13: error: 'i' undeclared (first use in this function)
   25 |         for(i=2;i<=n/2;++i)
      |             ^
main.c:25:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
  	int n,c=0;
  	scanf("%d",&n);
  	if(isprime(n))
      printf("1");
  	else
    {
      	for(i=2;i<=n/2;++i)
        {
          	if(n%i==0)
            {
              n/=i;
              ++c;
            }
          if(n==1)
            break;
        }
      printf("%d",c);
    }
}

Compiler output:
main.c: In function 'main':
main.c:6:12: error: implicit declaration of function 'isprime' [-Wimplicit-function-declaration]
    6 |         if(isprime(n))
      |            ^~~~~~~
main.c:10:13: error: 'i' undeclared (first use in this function)
   10 |         for(i=2;i<=n/2;++i)
      |             ^
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

template <typename T>
inline bool is_prime(T n)
{
    if(n <= 1) {
        return false ;
    }

    if(n == 2) {
        return true ;
    }

    if(n % 2 == 0) {
        return false ;
    }

    const auto iter_num = static_cast<T>(std::sqrt(n)) ;
    for(T i = 3 ; i <= iter_num ; i += 2) {
        if(n % i == 0) {
            return false ;
        }
    }
    return true ;
}

template <typename T>
inline auto compute_z_list(T n)
{
    std::vector<T> vec ;
    for(T i = 2 ; i <= n ; i ++) {
        if(n % i != 0 || !is_prime(i)) {
            continue ;
        }

        unsigned int elem = i ;
        while(n % i == 0) {
            n /= i ;
            vec.push_back(elem) ;
            elem *= i ;
        }

    }

    std::sort(vec.begin(), vec.end()) ;
    const auto& itr = std::unique(vec.begin(), vec.end()) ;

    if(itr == vec.end()) return vec ;

    vec.erase(itr) ;
    return vec ;
}

template <typename T>
inline size_t func(T num)
{
    static const auto z_list = compute_z_list(num) ;

    static std::vector<T> vec ;
    if(num == 1) return vec.size() ;

    for(auto z : z_list) {
        if(num % z != 0) {
            continue ;
        }

        if(std::find(vec.cbegin(), vec.cend(), z) == vec.cend()) {
            vec.push_back(z) ;
            return func(num / z) ;
        }
    }

    return vec.size() ; //not reached
}


int main()
{
    unsigned long long num ;
    std::cin >> num ;

    if(is_prime(num)) {
        std::cout << 1 << std::endl ;
        return 0 ;
    }

    std::cout << func(num) << std::endl ;
    return 0 ;
}

Compiler output:
a.cc: In function 'bool is_prime(T)':
a.cc:20:47: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   20 |     const auto iter_num = static_cast<T>(std::sqrt(n)) ;
      |                                               ^~~~
      |                                               sort
Language: C++

#include <iostream>

using namespace std;

int ca(int c){
  int x = 0;
  for(int i=1; i<c; i++){
    if(c<i) break;
    c-=i;
    x++;
  }
  return x;
}

int main(void){

  long long N;
  int a, c, ans = 0;

  cin >> N;

  for(long long z=2; z*z<=N; z++){
    a = c = 0;
    while(true){
      if(N%z==0){
        N = N / z;
        c++;
      }
      else{
        ans += ca(c);
        break;
      }
    }
  }
  if(M!=1) ans++;

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:6: error: 'M' was not declared in this scope
   35 |   if(M!=1) ans++;
      |      ^
Language: C++

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

vector<long long int > primes;
bool isprime[2000009];
int ndiv[2000009];

void div()
{
    long long int sum=0;
    for(int i=1; sum<=1000000; i++)
    {
        sum+=i;
        ndiv[sum]=i;
    }
    int c =1;
    for(int i=1; i<=1000000; i++)
    {
        if(ndiv[i]==0)
            ndiv[i]=c;
        else
            c=ndiv[i];
    }


}
void sieve()
{
    for(int i=3; i<=1000005; i+=2)
    {
        if(isprime[i]==0)
        {
            for(int j=i*2; j<=1000005; j+=i)
                isprime[j]=1;
        }
    }
    primes.push_back(2);
    for(int i=3; i<=1000005; i+=2)
        if(isprime[i]==0)
            primes.push_back(i);
}

int main()
{
    sieve();
    div();
    long long num ;
    map<long long int,long long  int >mp;
    vector<long long int > st;
    while(cin>>num)
    {
        n=num;
        for(int i=0; i<=sqrt(num); i++)
        {
            if(num%primes[i]==0)
            {
                st.push_back(primes[i]);
                while(num%primes[i]==0)
                {
                    mp[primes[i]]++;
                    num/= primes[i];
                }
            }
        }
        if(num>1)
        {
            st.push_back(num);
            mp[num]++;
        }
        int sum=0;
        for(int i=0; i<st.size(); i++)
        {
            ///cout<<st[i]<<"   "<<mp[st[i]]<<endl;

                sum+= ndiv[mp[st[i]]];
        }
        cout<<sum<<endl;
        mp.clear();
        st.clear();
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'n' was not declared in this scope; did you mean 'yn'?
   52 |         n=num;
      |         ^
      |         yn
Language: C++


#include<iostream>
#include <string.h>
#include<stdio.h>
#include <vector>
#include <math.h>


using namespace std;
typedef long long ll;

#define rep(i,n) for (int i = 0; i < (n); i++)


int main() {
	ll n,nr;
	cin >> n;
	vector<pair<ll, int>> q(ll x);
	nr = sqrt(n);
	for (int i = 2; i <= nr; i++) {
		int c = 0;
		while (n % i == 0) {
			n /= i;
			c++;
		}
		q.push_back(pair<int, int>(i, c));
	}
	


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: request for member 'push_back' in 'q', which is of non-class type 'std::vector<std::pair<long long int, int> >(ll)' {aka 'std::vector<std::pair<long long int, int> >(long long int)'}
   26 |                 q.push_back(pair<int, int>(i, c));
      |                   ^~~~~~~~~
Language: C

#include <iostream>
#include <map>

using namespace std;

map<long long, long long> prime_factor(long long n) {
  map<long long, long long> ret;

  for(long long i = 2;i*i <= n;i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n!=1)
    ret[n] = 1;
  return ret;

}

long long div_game(long long n) {
  map<long long, long long> pf = prime_factor(n);

  long long count = 0;
  for(auto i = pf.begin(); i != pf.end(); ++i) {
    //cout << i->first << "->" << i->second << endl;
    long long remove = 1;
    long long count_per_prime = i->second;
    while(remove <= count_per_prime) {
      //cout << remove << "!!" << endl;
      count ++;
      count_per_prime -= remove;
      remove++;
    }
  }

  return count;
}

int main() {
  long long n;
  cin >> n;
  cout << div_game(n);
}

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

import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    printTestValue();
    // abc170_d();
    // abc169_b();
    // abc169_c();
    // abc169_d();
  }

  // int 2147483648 [ 2 * 10(9)]
  // long 9223372036854775808 [ 9 * 10(18)]

  public static void abc169_d() {
    try (Scanner sc = new Scanner(System.in)) {

      long n = Long.parseLong(sc.next());
      long m = n;

      long num1 = 2L;
      long num2 = 1L;
      int count = 0;

      while (num1 * num1 <= m) {
        long num = (long) Math.pow(num1, num2);
        if (n % num != 0) {
          num1++;
          num2 = 1L;
          continue;
        }
        n /= num;
        count++;
        num2++;
      }

      if (n == m && n != 1) {
        count = 1;
      }
      System.out.println(count);
    } catch (Exception e) {
      System.out.println("エラー" + e);
    }
  }
}

Compiler output:
Main.java:13: error: cannot find symbol
    printTestValue();
    ^
  symbol:   method printTestValue()
  location: class Main
1 error
Language: C++

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

bool z_finder(const vector<long long>& used_z, long long number) {
	auto itr = find(used_z.begin(), used_z.end(), number);
	size_t index = distance(used_z.begin(), itr);
	if (index != used_z.size()) { // 発見できたとき
		return true;
	}
	else return false;
}

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

	vector<long long> dp; //素数だけ格納する配列
	dp.emplace_back(2);
	dp.emplace_back(3);
	for (long long i = 5; i < n; i++)
	{
		int flag = 0;
		for (int j = 0; j < (int)dp.size(); j++)
		{
			if (i % dp[j] == 0) {
				flag = 1;
				break;
			}
		}
		if (flag == 1) continue;
		if (n % i) continue;
		else dp.emplace_back(i);
	}

	int ans = 0;
	long long z;
	vector<long long> used_z;
		for (int i = 0; dp[i] < n; i++) {
			for (long long e = 1; pow(dp[i],e) <= n; e++) {
				z = (long long)pow(dp[i], e);
				if (n % z == 0) {
					if (z_finder(used_z, z) == false) {
						n = n / z;
						ans++;
						used_z.emplace_back(z);
					}
				}
				else break;
			}
		}

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

Compiler output:
a.cc: In function 'bool z_finder(const std::vector<long long int>&, long long int)':
a.cc:7:24: error: no matching function for call to 'find(std::vector<long long int>::const_iterator, std::vector<long long int>::const_iterator, long long int&)'
    7 |         auto itr = find(used_z.begin(), used_z.end(), number);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:7:24: note:   '__gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
    7 |         auto itr = find(used_z.begin(), used_z.end(), number);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

ll a;
long double b;
cin>>a>>b;
ll ans;
ans=a*b;
cout<<ans;

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll a;
      | ^~
a.cc:3:1: error: 'cin' does not name a type
    3 | cin>>a>>b;
      | ^~~
a.cc:4:1: error: 'll' does not name a type
    4 | ll ans;
      | ^~
a.cc:5:1: error: 'ans' does not name a type
    5 | ans=a*b;
      | ^~~
a.cc:6:1: error: 'cout' does not name a type
    6 | cout<<ans;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long;
using namespace std;
int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   long long int n;
   cin>>n;
   long long int ans=0;
   if(n%2==0)
   {
       long long int h=0;
       while(n%2==0)
        {
            h++;
            n=n/2;
        }
      for(j=1;j<50;j++)
      {
          if((j*(j+1))/2>h)
           {
               ans+=i-1;
               break;
           }
      }
   }
       for(long long int i=3;i*i<=n;i+=2)
       {
           long long  int h=0;
           while(n%i==0)
           {
               h++;
               n=n/i;
           }
          for(int j=1;j<50;j++)
         {
          if((j*(j+1))/2>h)
           {
               ans+=i-1;
               break;
           }
         }   
       }
       if(n!=1)
        ans++;
        cout<<ans<<"\n";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'j' was not declared in this scope
   19 |       for(j=1;j<50;j++)
      |           ^
a.cc:23:21: error: 'i' was not declared in this scope
   23 |                ans+=i-1;
      |                     ^
Language: C++

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

using namespace std;

int main() {
	long long n,rest;
	double root;
	int count=0;
	
	cin >> n;
	root = sqrt(n);

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

	rest = n;
	for (int i = 2; i <= root; i++) {
		if (rest % i == 0) {
			rest /= i;
			count++;
		}
	}
	if (n % rest == 0 && rest > root) {
		count;
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bitset<1000010>pk;
vector<ll>udd;
void eos(ll x)
{
    ll g,h,f;
    pk.set();
    pk[0]=pk[1]=0;
    for(h=4;h<=x;h+=2)pk[h]=0;
    udd.push_back(2);
    for(g=3;g<=x;g+=2)if(pk[g]){
        for(h=g*g,f=2*g;h<=x;h+=f)pk[h]=0;
        udd.push_back(g);
    }
}
int main()
{
    eos(1e6+7);
    int g,pre=0,re=0;
    ll q,x;
    scanf("%lld",&q);
    for(g=0;g<udd.size()&&udd[g]*udd[g]<=q;g++){
        x=udd[g];
        while(q%x==0){
            re++;
            q/=x;
            x*=udd[g];
            pre=g;
        }
    }
    if(udd[pre]!=q&&q!=1){
        if(q<=udd[pre]){
            printf("%d\n",re);
            return 0;
        }
        for(g=0;g<udd.size()&&udd[g]*udd[g]<=q;g++)if(q%udd[g]==0){
            printf("%d\n",re);`
            return 0;
        }
        printf("%d\n",re+1);
    }
    else printf("%d\n",re);
    return 0;
}


Compiler output:
a.cc:39:31: error: stray '`' in program
   39 |             printf("%d\n",re);`
      |                               ^
Language: C++

#include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <set>

#define rep(i,n)  for (int i = 0; i < (int)(n); i++)
#define INF 9999999999
#define PI 3.14159265359
#define ull unsigned long long
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()
{
	ull i=2,n;
	int j=1,ans=0;
	cin >> n;
	while(n>=pow(i,j)){
		while(n%pow(i,j)==0){
			ans++;
			n=n/pow(i,j);
			j++;
		}
		i++;
		while(!IsPrime(i))i++;
		j=1;
	}


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


Compiler output:
a.cc: In function 'int main()':
a.cc:41:24: error: invalid operands of types 'long long unsigned int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   41 |                 while(n%pow(i,j)==0){
      |                       ~^~~~~~~~~
      |                       |    |
      |                       |    __gnu_cxx::__promote<double>::__type {aka double}
      |                       long long unsigned int
Language: C

#include<bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265358979323846;  /* pi */

int main() {
    long long n;
    cin >> n;
    int ans = 0;
    for (long long p = 2; p <= sqrt(n) + 10; p ++)
    {
        if (n % p == 0)
        {
            long long v = p;
            for (int e = 1; e <= 100000; e++)
            {
                if (n % v == 0)
                {
                    n /= v;
                    ans ++;
                }
                else
                    break;
                v *= p;
            }

            while (n % p == 0)
                n /= p;
        }
    }
    if (n > 1)
        ans ++;
    cout << ans;
    return 0;
}

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

use proconio::*;
use std::collections::HashMap;

fn main() {
    input! {
        n: i64,
    }

    let mut n = n;
    let mut hm = HashMap::new();
    for i in 2..n {
        if i * i > n {
            break;
        }

        while n % i == 0 {
            hm.entry(i)
                .and_modify(|x| *x += 1)
                .or_insert(1);

            n /= i;
        }
    }

    if n != 1 {
        hm.entry(n)
            .and_modify(|x| *x += 1)
            .or_insert(1);
    }

    let mut ans = 0;
    for (_, v) in hm {
        let mut sum = 0;
        for i in 1..v {
            if sum + i > v {
                break;
            }

            ans += 1;
            sum += i;
        }
    }

    println!("{}", ans);
}


Compiler output:
main.c:1:1: error: unknown type name 'use'
    1 | use proconio::*;
      | ^~~
main.c:1:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    1 | use proconio::*;
      |             ^~
main.c:2:1: error: unknown type name 'use'
    2 | use std::collections::HashMap;
      | ^~~
main.c:2:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    2 | use std::collections::HashMap;
      |        ^~
main.c:4:1: error: unknown type name 'fn'
    4 | fn main() {
      | ^~
main.c: In function 'main':
main.c:5:5: error: 'input' undeclared (first use in this function); did you mean 'int'?
    5 |     input! {
      |     ^~~~~
      |     int
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:10: error: expected ';' before '!' token
    5 |     input! {
      |          ^
      |          ;
main.c:10:5: error: unknown type name 'let'
   10 |     let mut hm = HashMap::new();
      |     ^~~
main.c:10:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hm'
   10 |     let mut hm = HashMap::new();
      |             ^~
main.c:11:9: error: expected '(' before 'i'
   11 |     for i in 2..n {
      |         ^
      |         (
main.c:11:9: error: 'i' undeclared (first use in this function)
main.c:11:14: error: too many decimal points in number
   11 |     for i in 2..n {
      |              ^~~~
main.c:32:10: error: '_' undeclared (first use in this function)
   32 |     for (_, v) in hm {
      |          ^
main.c:32:13: error: 'v' undeclared (first use in this function)
   32 |     for (_, v) in hm {
      |             ^
main.c:32:14: error: expected ';' before ')' token
   32 |     for (_, v) in hm {
      |              ^
      |              ;
main.c:32:14: error: expected expression before ')' token
main.c:32:16: error: 'in' undeclared (first use in this function); did you mean 'int'?
   32 |     for (_, v) in hm {
      |                ^~
      |                int
main.c:32:18: error: expected ';' before 'hm'
   32 |     for (_, v) in hm {
      |                  ^~~
      |                  ;
main.c:34:18: error: too many decimal points in number
   34 |         for i in 1..v {
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	long long int N;
	cin >> N;
	long long int count = 0;
	if (N == 1) {
		cout << 0 << endl;
	}
	else {
		for (int i = 1; i < sqrt(N); i++) {
			if (N % i == 0) {
				count++;
				N = N / i;
			}
		}
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:37: error: 'sqrt' was not declared in this scope
   11 |                 for (int i = 1; i < sqrt(N); i++) {
      |                                     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <queue>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define srep(i,s,t) for (int i = s; i < t; i++)
#define drep(i,n) for(int i = (n)-1; i >= 0; i--)
using namespace std;
typedef long long ll;
typedef vector<vector<char>> field_t;
typedef unsigned long long ull;
typedef pair<ll, ll> point_t;
vector<point_t>  prime_factorize(ll n) {
    vector<point_t> res;
    for(ll p=2;p*p<=N;++p){
        if(n%p!=0){
            continue;
        }
        ll num =0;
        while(n%p==0){
            ++num;
            n/=p;

        }
        res.push_back(make_pair(p,num));
    }
    if(n!=1){
        res.push_back(make_pair(n,1));
    }
    return res;
}

int main()
{
    ll N,ans,now;
    cin >> N;
    vector<point_t> v=prime_factorize(N);
    for(ll i=0;i<v.size();i++){
        now=v[i].first;
        for(ll j=1;j<=v[i].second;j++){
            if(v[i].second>=j){
                v[i].second-=j;
                N/=now;
                ans++;
            }
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::pair<long long int, long long int> > prime_factorize(ll)':
a.cc:15:21: error: 'N' was not declared in this scope
   15 |     for(ll p=2;p*p<=N;++p){
      |                     ^
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <queue>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define srep(i,s,t) for (int i = s; i < t; i++)
#define drep(i,n) for(int i = (n)-1; i >= 0; i--)
using namespace std;
typedef long long ll;
typedef vector<vector<char>> field_t;
typedef unsigned long long ull;
typedef pair<ll, ll> point_t;
vector<point_t>  prime_factorize(ll n) {
    vector<point_t> res;
    for(ll p=2;p*p<=N;++p){
        if(n%p!=0){
            continue;
        }
        ll num =0;
        while(n%p==0){
            ++num;
            n/=p;

        }
        res.push_back(make_pair(p,num));
    }
    if(n!=1){
        res.push_back(make_pair(n,1));
    }
    return res;
}

int main()
{
    ll N,ans,now;
    cin >> N;
    vector<point_t> v=prime_factorize(N);
    for(ll i=0;i<v.size();i++){
        now=v[i].first;
        for(ll j=1;j<=v[i].second;j++){
            if(v[i].second>=j){
                v[i].second-=j;
                n/=now;
                ans++;
            }
        }
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::pair<long long int, long long int> > prime_factorize(ll)':
a.cc:15:21: error: 'N' was not declared in this scope
   15 |     for(ll p=2;p*p<=N;++p){
      |                     ^
a.cc: In function 'int main()':
a.cc:43:17: error: 'n' was not declared in this scope
   43 |                 n/=now;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int (i) = 0; (i) < (n); i++)
#define ll long long
using namespace std;
 
int main() {
    ll n;
    cin>>n;
    ll kotae=0;
    for (ll i=2;i<=n;i++) {
        ll num=1;
        ll ans=0;
        while(1) {
            if (n%i!=0){
              break;
              n/=i;
              ans++;
            if (ans>=num) {
                kotae++;
                num++;
                ans=0;
            }
        }
    }
    if (n != 1) kotae++;
    cout<<kotae<<endl;
    return 0;
}


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

#include "iostream"
#include "vector"
#include "algorithm"
#define int long long
using namespace std;
int main()
{
    int n;
    cin>>n;
    int ans=0;
    for(int i=2;i<1000010;i++)
    {
       int count=0;
        while(n%i==0)
        {
            n/=i;
            count++;
        }
        
        for(int j=1;j<10000;j++)
        {
            if(count<j)
             break;
            ans++;

            count-=j;
            
        }
        
    }
    
    if(n>1)
    { ans++;}
    
    cout<<ans<<endl;
    
    
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;

ll prime(ll n, vector<ll> &s, ll num){
  ll count = 0;
  bool flag = false;
  while(n % num == 0){
    flag = true;
    count++;
    n /= num;
  }
  if (flag) s.push_back(count);
  return n;
}

int main(){
  ll n;
  cin >> n;
  vector<ll> count;
  n = prime(n, count, 2);
  ll ans = 0;
  for(ll i = 3; i <= n; i+=2){
    n = prime(n, count, i);
  }
  for(ll x : count){
    ll beki = 4;
    x -= 3;
    ans++;
    while(x >= 0){
      ans++;
      x -= beki;
      beki++;
    }
  }
  cout << ans << endl;
  
  return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;

bool isPri(int64_t 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;
}

vector<int64_t> vec;
bool element(int64_t i) {
	for (auto a : vec)
	{
		if (i == a)return true;
	}
	return false;
}

int64_t func(int64_t N) {

	int64_t z;
		for (int64_t i = 2; i <= N; i++)
		{
			if (isPri(i))
			{
				z = 1;
				while (z <= N)
				{
					z *= i;
					if (N % z == 0)
					{
						if (element(z)) {
							continue;
						}
						return z;
					}
				}
			}
		}
	return 0;
}

int main() {
	int64_t N;
	int64_t z;
	cin >> N;

	int count = 0;

	while ((z = func(N)) != 0)
	{
		count++;
		N /= z;
		vec.push_back(z);
	}

	cout <<count;


	return 0;

}

Compiler output:
a.cc: In function 'bool isPri(int64_t)':
a.cc:12:26: error: 'sqrt' was not declared in this scope
   12 |         double sqrtNum = sqrt(num);
      |                          ^~~~
Language: C++

#include <iostream>
#define ll long long
using namespace std;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	ll last = 2, ret = 0, z; cin>>z;
	while(z != 1){
		ll pre = z;
		while(last * last <= sqrtn){
			if(z % last == 0){
				z /= last++;
				break;
			}
			last++;
		}
		ret++;
		if(pre == z) break;
	}
	cout<<ret;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:38: error: 'sqrtn' was not declared in this scope
    9 |                 while(last * last <= sqrtn){
      |                                      ^~~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
typedef long long LL;
const int e[40]={0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
                 5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8};
const LL UnUseMethod=4759123141;
int sz=0;LL N,factors[100];
LL IN(void)
{
  LL x=0;short f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
LL GCD(LL a,LL b){return !b?a:GCD(b,a%b);}
LL BinaryModularPower(LL x,LL y,LL mod)
{LL p=x,v=1;for(;y;y>>=1,p=(p*p)%mod){if(y&1)v=(v*p)%mod;}return v;}
int test(LL n,LL a,LL d)
{
  if(n==2){return 1;}
  if(n==a){return 0;}
  if(!(n&1)){return 0;}
  while(!(d&1LL)){d>>=1;}
  LL t=BinaryModularPower(a,d,n);
  if(t==1){return 1;}
  while(d!=n-1LL&&t!=n-1LL&&t!=1LL){t=(LL)((long double)(t*t)-1e-8)%n+64)%n;d<<=1;}
  return t==n-1LL;
}
int MillerRabin(LL n)
{
  if(n==1||n==3825123056546413051LL){return 0;}
  const LL base[9]={2,3,5,7,11,13,17,19,23};
  for(int i=0;i<9;++i)
  {
    if(n==base[i]){return 1;}
    if(!test(n,base[i],n-1LL)){return 0;}
  }
  return 1;
}
LL PollardRho(LL n)
{
  srand(time(NULL));
  LL i=1,k=2,x=rand()%(n-1)+1,y=x,divisor;
  while(1)
  {
    i++,x=((LL)((long double)(x*x)-1e-8)%n+64)%n,divisor=GCD((y-x+n)%n,n);
    if(1LL<divisor&&divisor<n){return divisor;}
    if(y==x){return n;}
    if(i==k){y=x;k<<=1;}
  }
}
void Find(const LL n)
{
  if(n==1)return;
  if(MillerRabin(n)){factors[sz++]=n;return;}
  static LL p=n;
  while(p>=n){p=PollardRho(n);}
  Find(p),Find(n/p);
}
int main(void)
{
  int count=0;
  LL a,p=1,q=-1;
  N=IN();
  if(N==1)return puts("0"),0;
  while(!(N%2)){count++;N/=2;}a=e[count],count=0;
  while(!(N%3)){count++;N/=3;}a+=e[count];
  while(q*q<=UnUseMethod)
  {
    p+=6,q+=6,count=0;
    while(!(N%p)){count++;N/=p;}a+=e[count],count=0;
    while(!(N%q)){count++;N/=q;}a+=e[count];
  }
  if(N<=UnUseMethod){if(N>1){a++;}return printf("%lld\n",a),0;}else p=0;
  if(MillerRabin(N)){a++;return printf("%lld\n",N),0;}
  Find(N);
  while(p<sz)
  {
    count=0;
    while(N%factors[p]==0){count++;N/=factors[p];}
    a+=e[count];
    p++;
  }
  if(N>1){a++;}return printf("%lld\n",a),0;
}

Compiler output:
a.cc: In function 'int test(LL, LL, LL)':
a.cc:25:73: error: expected ';' before ')' token
   25 |   while(d!=n-1LL&&t!=n-1LL&&t!=1LL){t=(LL)((long double)(t*t)-1e-8)%n+64)%n;d<<=1;}
      |                                                                         ^
      |                                                                         ;
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
typedef long long LL;
const int e[40]={0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
                 5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8};
const LL UnUseMethod=4759123141;
int sz=0;LL N,factors[100];
LL IN(void)
{
  LL x=0;short f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
LL GCD(LL a,LL b){return !b?a:GCD(b,a%b);}
LL BinaryModularPower(LL x,LL y,LL mod)
{LL p=x,v=1;for(;y;y>>=1,p=(p*p)%mod){if(y&1)v=(v*p)%mod;}return v;}
int test(LL n,LL a,LL d)
{
  if(n==2){return 1;}
  if(n==a){return 0;}
  if(!(n&1)){return 0;}
  while(!(d&1LL)){d>>=1;}
  LL t=BinaryModularPower(a,d,n);
  if(t==1){return 1;}
  while(d!=n-1LL&&t!=n-1LL&&t!=1LL){t=(LL)((long double)(x*x)-1e-8)%n+64)%n;d<<=1;}
  return t==n-1LL;
}
int MillerRabin(LL n)
{
  if(n==1||n==3825123056546413051LL){return 0;}
  const LL base[9]={2,3,5,7,11,13,17,19,23};
  for(int i=0;i<9;++i)
  {
    if(n==base[i]){return 1;}
    if(!test(n,base[i],n-1LL)){return 0;}
  }
  return 1;
}
LL PollardRho(LL n)
{
  srand(time(NULL));
  LL i=1,k=2,x=rand()%(n-1)+1,y=x,divisor;
  while(1)
  {
    i++,x=((LL)((long double)(x*x)-1e-8)%n+64)%n,divisor=GCD((y-x+n)%n,n);
    if(1LL<divisor&&divisor<n){return divisor;}
    if(y==x){return n;}
    if(i==k){y=x;k<<=1;}
  }
}
void Find(const LL n)
{
  if(n==1)return;
  if(MillerRabin(n)){factors[sz++]=n;return;}
  static LL p=n;
  while(p>=n){p=PollardRho(n);}
  Find(p),Find(n/p);
}
int main(void)
{
  int count=0;
  LL a,p=1,q=-1;
  N=IN();
  if(N==1)return puts("0"),0;
  while(!(N%2)){count++;N/=2;}a=e[count],count=0;
  while(!(N%3)){count++;N/=3;}a+=e[count];
  while(q*q<=UnUseMethod)
  {
    p+=6,q+=6,count=0;
    while(!(N%p)){count++;N/=p;}a+=e[count],count=0;
    while(!(N%q)){count++;N/=q;}a+=e[count];
  }
  if(N<=UnUseMethod){if(N>1){a++;}return printf("%lld\n",a),0;}else p=0;
  if(MillerRabin(N)){a++;return printf("%lld\n",N),0;}
  Find(N);
  while(p<sz)
  {
    count=0;
    while(N%factors[p]==0){count++;N/=factors[p];}
    a+=e[count];
    p++;
  }
  if(N>1){a++;}return printf("%lld\n",a),0;
}

Compiler output:
a.cc: In function 'int test(LL, LL, LL)':
a.cc:25:58: error: 'x' was not declared in this scope
   25 |   while(d!=n-1LL&&t!=n-1LL&&t!=1LL){t=(LL)((long double)(x*x)-1e-8)%n+64)%n;d<<=1;}
      |                                                          ^
Language: C++

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

int main(){
  long long N , ans ;
  int count =0;
  cin >> N ;
  for(int i=2;i*i<=N;i++){
    count = 0;
    while(N%i==0){
      count++;
      N /= i ;
    }
    for(int j=1;j<50;j++){
      if(count-j>=0){
        ans++:
        count -= j;
      }
      else break;
    }
  }
  if(N>1) ans++;
  cout << ans << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected ';' before ':' token
   16 |         ans++:
      |              ^
      |              ;
Language: C

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

int main() {
	long long n;
	cin >> n;
	vector<pair<long long, int>> fs;//素数・係数のペア

	//素因数分解
	for (long long i = 2; i * i <= n; ++i) {
		int x = 0;//係数
		while (n%i == 0)
		{
			n /= i;
			++x;
		}
		fs.emplace_back(i, x);
	}
	if (n != 1)fs.emplace_back(n, 1);


	int ans = 0;
	for (auto i: fs)
	{
		int x = i.second;//係数の取り出し
		int tmp = 1;
		while (tmp <= x)
		{
			x -= tmp;
			tmp++;
			ans++;
		}
	}

	cout << ans << endl;


	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>
using namespace std;
typedef long long int ll;

#define rep( i, n, m ) for(int i = ( n ); i < ( m ); i++)
#define rep_d( i, n, m ) for(int i = ( n ) - 1; i >= ( m ); i--)
#define sort_asc( X ) sort(( X ).begin(), ( X ).end())
#define sort_desc( X ) sort(( X ).begin(), ( X ).end(), greater <>())
#define endl "\n"

template <class T> bool chmax( T& a, T b );
template <class T> bool chmin( T& a, T b );
int* eratosthenes( int N );
bool bit_search( int pattern, int N );
void initialize( void );

const ll INF = 1LL << 60;
const int k_mod = 1e9 + 7;
template <typename T, typename K> struct P {
	T a; K b;
};
vector <P <ll, ll> >prime_factorize( ll N ){
	vector <P <ll, ll> > vec;
	int lim = sqrt( N ) + 1;
	rep( i, 2, N + 1 ){
		if (i >= lim){
			vec.push_back( P <ll, ll>{N, 1} );
			break;
		}
		if (N % i == 0){
			vec.push_back( P <ll, ll>{i, 0} );
			while(N % i == 0){
				N /= i;
				vec.back().b++;
			}
		}
	}
	return vec;
}
int arr[ 1005 ] = {};
int main( void ){
	// initialize();
	ll N;
	cin >> N;
	const auto &vec = prime_factorize( N );
	ll int = 0;
	for(auto v:vec){
		int cnt = 0, B = v.b;
		rep( i, 1, v.b + 1 ){
			if (B < i)
				break;
			B -= i;
			cnt++;
		}
		ans += cnt;
	}
	cout << ans << endl;
}
template <class T> bool chmax( T& a, T b ) {
	if (a < b){
		a = b; return true;
	}
	return false;
}
template <class T> bool chmin( T& a, T b ) {
	if (a > b){
		a = b; return true;
	}
	return false;
}
int* eratosthenes( int N ){
	int* prime_array = new int[ N + 1 ];
	int lim = N;
	prime_array[ 0 ] = 0;
	prime_array[ 1 ] = 0;
	rep( i, 2, N + 1 ){
		prime_array[ i ] = 1;
	}
	rep( i, 2, lim ){
		if (prime_array[ i ] == 0)
			continue;
		lim = N / i;
		for(int j = i * 2; j < N + 1; j += i){
			prime_array[ j ] = 0;
		}
	}
	return prime_array;
}
bool bit_search( int pattern, int N ){
	int cnt = 0;
	rep( bit, 0, N ){
		if (pattern & ( 1 << bit )){
			cnt++;
		}
	}
	return true;
}
void initialize( void ){
	cout << fixed << setprecision( 10 );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:16: error: expected unqualified-id before '=' token
   46 |         ll int = 0;
      |                ^
a.cc:55:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |                 ans += cnt;
      |                 ^~~
      |                 abs
a.cc:57:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   57 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>

using namespace std;

bool LF_PRIME_SEQUENCE(const long int &n, vector<int> &vPrime){
    if(n < 2){
        return false;
    }
    vPrime.clear();
    vPrime.push_back(2);
    for (long int i = 2; i * i <= n; i++){
        long int iPrimeType = 1;
        for(long int j = 0; j < vPrime.size(); j++){
            if(i % vPrime[j] == 0){
                iPrimeType = 0;
                break;
            }
            if(i < vPrime[j] * vPrime[j]){
                break;
            }
        }
        if(iPrimeType == 1){
            vPrime.push_back(i);
        }
    }
    return true;
}

int main(){
    long int N;
    scanf("%ld", &N);
    vector<long int> vPrime;
    if(!LF_PRIME_SEQUENCE(N, vPrime)){
        printf("%d", 0);
    } else {
        long int nSum = 0;
        for(long int i = 0; i < vPrime.size(); i++){
            int nCount = 0;
            while(N % vPrime[i] == 0){
                N /= vPrime[i];
                nCount++;
            }
            if(nCount != 0){
                int k = 0;
                for (int j = 1; j < nCount + 2; j++){
                    k += j;
                    if(k > nCount){
                        nSum += (j - 1);
                        break;
                    }
                }
            }
        }
        if(N != 1){
            nSum++;
        }
        printf("%d", nSum);
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:30: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'std::vector<long int>'
   36 |     if(!LF_PRIME_SEQUENCE(N, vPrime)){
      |                              ^~~~~~
a.cc:8:56: note: in passing argument 2 of 'bool LF_PRIME_SEQUENCE(const long int&, std::vector<int>&)'
    8 | bool LF_PRIME_SEQUENCE(const long int &n, vector<int> &vPrime){
      |                                           ~~~~~~~~~~~~~^~~~~~
Language: C++

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

int main(){
long long n;
  int c=0;
  int d=0;
  cin>>n;
  vector<long long> a(17);
  if(n>3){
  for(int i=2;i*i<=n;i++){
 int b=0;
    while(n%i==0){
b++;
      n/=i;
    }
    if(b!=0){
      a.at(d)=b;
      d++;
  }
  }
 if(n!=1){
c++;
 }
  for(int i=0;a.at(i)!=0;i++){
for(int j=0;a.at(i)>=j;j++){
  a.at(i)-=j;
  c++;
}
  }
  cout<<c<<endl;
}
  else if(n==1){
cout<<0<<endl;
  }else {
cout<<1<<Endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:36:10: error: 'Endl' was not declared in this scope
   36 | cout<<1<<Endl;
      |          ^~~~
Language: C++

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

int main(){
long long n;
  int c=0;
  int d=0;
  cin>>n;
  vector<long long> a(17);
  for(int i=2;i*i<n;i++){
 int b=0;
    while(n%i==0){
b++;
      n/=i;
    }
    if(b!=0){
      a.at(d)=b;
      b++;
  }
  for(int i=0;a.at(i)!=0;i++){
for(int j=0;a.at(i)>=j;j++){
  a.at(i)-=j;
  c++;
}
  }
  cout<<c<<endl;
}
  


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

import java.util.ArrayList;
import java.util.Scanner;
public class Div__Game {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		long N = s.nextInt();
		int counter=0;
		ArrayList sosus = new ArrayList();

		for(int i=2; i<=N; i++) {
			while(N%i == 0 ) {
				sosus.add(i);
				N = N/i;
			}
		}
		
		
		int num=1;
		for(int i=0; i<sosus.size()-1; i++) {
			if(sosus.get(i) == sosus.get(i+1)) {
				num++;
				if(i== sosus.size()-2) {
					for(int k=1; num>0; k++) {
						counter++;
						num = num-k-1;
						
					}
					
				}
			}
			else {
				for(int k=1; num>0; k++) {
					counter++;
					num = num-k;
					
				}
				num =1;
				
			}
		
			
		}

		/*for(int i=0; i<sosus.size(); i++) {
			System.out.print(sosus.get(i));
		} */


		System.out.println(counter);

	}

}


Compiler output:
Main.java:3: error: class Div__Game is public, should be declared in a file named Div__Game.java
public class Div__Game {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

/**
*    author:  Dooloper
*    created: 04.06.2020 01:27:47
**/

#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <deque>
#include <stack>
#include <cmath>
#include <functional>
#include <cassert>


using namespace std;
typedef unsigned long long ull;
typedef long long ll;

int main() {
    cin.tie(0);
    ll N;cin>>N;
    vector<int> eratosu(N+10,0);
    vector<int> primeFactor;
    // /*エラトステネスの篩*/
    // for(int i = 2; i < sqrt(N);i++){
    //     if(!eratosu[i]){
    //         for(int j = 2; i*j < sqrt(N); j++){
    //             eratosu[i*j] = 1;
    //         }
    //     }
    // }
    
    /*素因数分解*/
    for (ll i = 2; i * i < N; i++){
        if(N % i == 0){
            primeFactor.push_back(1);
            while (N % i == 0){
                primeFactor[primeFactor.size() - 1]++;
                N /= i;
            }
        }
    }
    if(N != 1){
        primeFactor.push_back(1);
    }

    ll ans = 0;
    for (vector<int> P: primeFactor){
        for (int i = 1; i <= P[i]; i++){
            P[i] -= i;
            ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:25: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
   53 |     for (vector<int> P: primeFactor){
      |                         ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
vector<pair<long long,long long>> prime(long long n){
  vector<pair<long long,long long>>res;
  for(int 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!=0) res.push_back({n,1});
  return res;
}
int main(){
  long long n;
  cin>>n;
  auto a=prime(n);
  long long ans=0;
  for(auto pf:a){
    long long e=p.second;
    long long tmp=0,cur=1;
    while(e>=cur) e-=cur++,++tmp;
    ans+=tmp;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: 'p' was not declared in this scope
   24 |     long long e=p.second;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for( int i=0; i<(n);++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
    ll n;
    ll a =2;
    cin >> n;
    if(n==1){
        cout<<0<<endl;
    }
    else{
    vector<int> vec(1000005);
    while(n>=a*a){
        if(n % a == 0){
            vec.at(a)++ ;
            n /=a ;
        }
        else a++;
    }
    if(n<1000000){
        vec.at(n)++;
    }
    
int  ans = 0;
rep(i,1000001){
    if(vec.at(i)>0){
       int b =1;
       while(vec.at(i)>=b){
           vec.at(i) -= b;
        b++;
        ans++;
       }

}
if(n == 1){
    cout << ans <<endl;
}
else{
    cout << ans+1 << endl;
}
    
}}


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

#include <stdio.h>

int main(){
  long long n;
  int count = 0;
  int count_r = 0;
  
  scanf("%lld", &n);
  
  for(int i = 2; i <= n; i++){
    if(i > n)
      break;
    
    while(n % i == 0){
      n /= i;
      count++;
    }
    
    int j = 1;
    
    while(count - j >= 0){
      count -= j;
      count_r++;
      j++;
    }
    
    count = 0;
  }
  
  if(count_r == 0){
    printf(n2 == 0 ? "0\n" : "1\n");
    return 0;
  }
  
  printf("%lld\n", count_r);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:12: error: 'n2' undeclared (first use in this function); did you mean 'n'?
   31 |     printf(n2 == 0 ? "0\n" : "1\n");
      |            ^~
      |            n
main.c:31:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
  int N,i=2,j,k,count;
  scanf("%d",&N);
  
  if(N%2==0){
    while(N%2==0){
      N /= i;
      i *= i;
      count++;
    }
  }
  for(j=3; j<=N; j++){
    k = j
    while(N%j==0){
      N /= k;
      k *= k;
      count++;
    }
  }
  return 0;
}
      
      
      
    

Compiler output:
main.c: In function 'main':
main.c:16:10: error: expected ';' before 'while'
   16 |     k = j
      |          ^
      |          ;
   17 |     while(N%j==0){
      |     ~~~~~