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

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

// bitset<(ll)1e6 + 100> isPrime;
// Not required
isPrime.set();
map<ll, int> primeFact; // stores the powers of respective factors.

inline void solve(ll gg){
	isPrime[0] = isPrime[1] = 0;
  	while (gg % 2 == 0)
    	gg >>= 1, primeFact[2]++;  	
  	for (int i = 3; i * i <= gg; i += 2){
    	while ( gg % i == 0)
          gg /= i, primeFact[i]++;
    }
}
int main()
{
  ll a, b;
  cin >> a >> b;
  ll gg = __gcd(a, b);
  solve(gg);
  cout << primeFact.size() + 1 << endl;
  return 0; 
}

Compiler output:
a.cc:2:10: fatal error: bitset.h: No such file or directory
    2 | #include <bitset.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd (ll a, ll b) { return b == 0 ? a : gcd (b, a % b); }

int main() {
    ll a, b;
    cin >> a >> b;
    
    ll n = gcd(a, b);
    
    vector<ll> factor;
    for (int i = 1; i * i < n; i++) {
        if (n % i == 0) {
            factor.push_back(i);
           	if(i * i != a) can.push_back(n/i);
        }
    }
    sort(factor.begin(), factor.end());
    
    int len = factor.size();
    vector<int> used(len, 0);
    int ans = 0;
    for (int i = 0; i < len; i++) {
        if (used[i]) continue;
        if (factor[i] == 1) ans++;
        else {
            ans++;
            for (int j = i + 1; j < len; j++) {
                if (factor[j] % factor[i] == 0) {
                    used[j] = 1;
                }
            }
        }
    }
    cout << ans << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: 'can' was not declared in this scope; did you mean 'tan'?
   16 |                 if(i * i != a) can.push_back(n/i);
      |                                ^~~
      |                                tan
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n); for(int i = 0;i < (int)(n);i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
int main(){
    ll a,b;
    cin >> a >> b;
    ll x = max(a,b),y=min(a,b);
    while(1){
        if(x < y)swap(x,y);
        if(y<=0)break;
        x %= y;
    }
    ll ans = 0;

    for(ll i = 2;i<=sqrt(x)+1;i++){
        ll c = x;
        bool ok = false;
        while(c%i==0){
            ok = true;
            c/=i;
        }
        ans++;
    }
    if(c!=1)ans++;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:8: error: 'c' was not declared in this scope
   26 |     if(c!=1)ans++;
      |        ^
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>;

ll gcd(ll a,ll b){
    ll c,d,e;
    c=max(a,b);
    d=min(a,b);
    while(1){
        c=c%d;
        if(c==0){
            break;
        }
        e=d;
        d=c;
        c=e;
    }
    return d;
}

int main(){
    ll a,b;
    cin >> a >> b;
    ll c;

    c=gcd(a,b);
    int c2;
    c2=c;
    

    int k,ans;
    ans=1;
    ll l;
    l=ll(pow(c,0.5));
    
    rep(i,l-1){
        k=0;
        while(c%(i+2)==0){
            c/=(i+2);
            k=1;
        }
        if(k==1){
            ++ans;
        }
        if(c==1){
            break;
        }
        if(c!=1 and i=l-2){
            ++ans;
        }
    }
    
    

    if(c!=1 and ans==1) {
        ++ans;
    }
    

    cout << ans << endl;
    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:17: error: lvalue required as left operand of assignment
   50 |         if(c!=1 and i=l-2){
      |            ~~~~~^~~~~
Language: C++

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

const int N = 1e6+234;

bool isNotPrime[N];
vector<long long> primes;

void solve() {
  for (long long i = 4; i < N; i+=2) {
    isNotPrime[i] = true;
  }
  primes.push_back(2);
  for (long long i = 3; i < N; i+=2) {
    if (isNotPrime[i]) continue;
    primes.push_back(i);
    for (long long j = i*i; j < N; j+=i) {
      isNotPrime[j] = true;
    }
  }
  long long a, b; scanf("%lld%lld", &a, &b);
  long long g = __gcd(a, b);
  vector<long long> v;
  v.push_back(1);
  for (long long p: primes) {
    if (g%p) continue;
    if (p > g) break;
    v.push_back(p);
  }
  if (v.size() == 1 && g == 1) putchar('1');
  else if putchar('2');
  else printf("%d", v.size());
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:42:11: error: expected '(' before 'putchar'
   42 |   else if putchar('2');
      |           ^~~~~~~
      |           (
a.cc:43:3: error: 'else' without a previous 'if'
   43 |   else printf("%d", v.size());
      |   ^~~~
Language: C++

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

const int N = 1e6+234;

bool isNotPrime[N];
vector<long long> primes;

void solve() {
  for (long long i = 4; i < N; i+=2) {
    isNotPrime[i] = true;
  }
  primes.push_back(2);
  for (long long i = 3; i < N; i+=2) {
    if (isNotPrime[i]) continue;
    primes.push_back(i);
    for (long long j = i*i; j < N; j+=i) {
      isNotPrime[j] = true;
    }
  }
  long long a, b; scanf("%lld%lld", &a, &b);
  long long g = __gcd(a, b);
  vector<long long> v;
  v.push_back(1);
  for (long long p: primes) {
    if (g%p) continue;
    if (p > g) break;
    v.push_back(i);
  }
  if (v.empty()) puts("2");
  else printf("%d", v.size());
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:39:17: error: 'i' was not declared in this scope
   39 |     v.push_back(i);
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long int
#define rep(i, n) for(int i = 0; i < n; i++)
#define repp(i, n) for(int i = 1; i <= n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define riverse(v) reverse((v).begin(), (v).end())
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vll = vector<ll>;
const ll MOD = 1e9+7;
vi alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m',
               'n','o','p','q','r','s','t','u','v','w','x','y','z'};

ll gcd(ll a, ll b) {
	if (a % b == 0)  return(b);
	else return(gcd(b, a % b));
}

bool IsPrime(ll 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() {
	ll A,B;
  	cin >> A >> B;
  	ll g = gcd(A,B);
  	set<ll> prime;
  	set.insert(1);
  	for(int i = 2;i<=sqrt(g)+10;i++){
    	if(g%i==0){
        	if(IsPrime(i)) prime.insert(i);
        }
    }
  	cout << prime.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:12: error: expected unqualified-id before '.' token
   40 |         set.insert(1);
      |            ^
Language: C++

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

//a<=b 最大公約数
int64_t gcd(int64_t a, int64_t b) {
    if (b % a == 0ll) { return a; }
    return gcd(b % a, a);
}

//b=2 素因数分解
vector<int64_t> fa(int64_t a, int64_t b) {
    vector<int64_t> y;
    while (1) {
        if (a == 1ll) { y.push_back(1); break; }
        if (b * b > a) { y.push_back(a); break; }
        if (a % b != 0ll) b++;
        if (a % b == 0ll) { y.push_back(b); a = a / b; }
    }
    return y;
}

int main() {
    int64_t a, b;
    cin >> a >> b;
    vector<int64_t> y = fa(gcd(min(a, b), max(a, b)), 2ll);
    int64_t o = y[0ll];
    if (o == 1ll) { cout << 1ll << endl; return 0; }
    int64_t A = 0;
    for (int64_t i : y) { if (o != i) A++; }
    cout << A + 2ll << endl;
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include "stdc++.h"
using namespace std;
typedef long long ll;

//a<=b 最大公約数
ll gcd(ll a, ll b) {
	if (b % a == 0) {
		return a;
	}
	return gcd(b % a, a);
}
//b=2 素因数分解
vector<ll> fa(ll a, int b) {
	vector<ll> lst;
	while (1) {
		if (b * b > a) {
			lst.push_back(a);
			break;
		}
		if (a % b == 0) {
			lst.push_back(b);
			b = b;
			a = a / b;
			continue;
		}
		b = b++;
	}
	return lst;
}

int main() {
	ll a, b;
	cin >> a >> b;
	vector<ll> lst = fa(gcd(min(a, b), max(a, b)), 2);
	int in = 2;
	ll x = lst.at(0);
	for (int i = 0; i < lst.size(); i++) {
		if (x != lst.at(i)) {
			in = in++;
		}
		x = lst.at(i);
	}
	if (lst.at(0) == 1) {
		cout << 1 << endl;
	}
	else {
		cout << in << endl;
	}
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

//a<=b 最大公約数
int gcd(int a, int b) {
	if (b % a == 0) {
		return a;
	}
	return gcd(b % a, a);
}
//b=2 素因数分解
vector<int> fa(int a, int b) {
	vector<int> lst;
	while (1) {
		if (b * b > a) {
			lst.push_back(a);
			break;
		}
		if (a % b == 0) {
			lst.push_back(b);
			b = b;
			a = a / b;
			continue;
		}
		b = b++;
	}
	return lst;
}

int main() {
	int a, b;
	cin >> a >> b;
	vector<int> lst = fa(gcd(min(a, b), max(a, b)), 2);
	int in = 2;
	int x = lst.at(0);
	for (int i = 0; i < lst.size(); i++) {
		if (x != lst.at(i)) {
			in = in++;
		}
		x = lst.at(i);
	}
	if (lst.at(0) == 1) {
		cout << 1 << endl;
	}
	else {
		cout << in << endl;
	}
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll);
ll mod_fact(ll, ll);
ll mod_inv(ll, ll);
ll gcd(ll, ll);
//
int main(){
    ll a, b;
    cin >> a >> b;
    ll c = gcd(a, b);
    int ans = 0;
    for(int i = 2; i <= sqrt(c); i++){
        if(c % i == 0){
            ++ans;
            while(!(c % i)) c /= i;
        }
    }
    if(c != 1) ans++;
    cout << ans + 1;
}

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

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

ll gcd(ll a, ll b){
    if(a%b == 0){
        return b;
    }else{
        return gcd(b, a%b);
    }
}

ll prime_fac_num(ll n){
  ll s = floor(sqrt(n));
  ll ans = 0;
  for(ll i=2; i<=s; i++){
    if(n%i==0){
      do{
        n /= i;
      }while(n%i==0);
      ans++;
    }
  }

  if(n>s){
    ans++;
  }

  return ans;
}

int prime_fac(int n, vector<pair<int, int> >&l){
  int s = floor(sqrt(n));
  int r;
  pair<int, int> x;
  for(int i=2; i<=s; i++){
    if(n%i==0){
      r=0;
      do{
        r++;
        n /= i;
      }while(n%i==0);
      x = make_pair(i, r);
      l.push_back(x);
    }
  }

  if(n>s){
    x = make_pair(n, 1);
    l.push_back(x);
  }

  return l.size();
}

int main(){
  ll a,b; cin>>a>>b;

  ll g = gcd(a, b);

  vector<pair<ll, ll> > buf;
  ll ans = 1 + prime_fac(g, buf);

  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:29: error: invalid initialization of reference of type 'std::vector<std::pair<int, int> >&' from expression of type 'std::vector<std::pair<long long int, long long int> >'
   62 |   ll ans = 1 + prime_fac(g, buf);
      |                             ^~~
a.cc:32:46: note: in passing argument 2 of 'int prime_fac(int, std::vector<std::pair<int, int> >&)'
   32 | int prime_fac(int n, vector<pair<int, int> >&l){
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~^
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a; i< (int)(b); ++i)
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
typedef long double ld;
using ll=long long;
using namespace std;
const int mod=1e9+7;
const ll inf = 1LL << 60;
const ld pi = (acos(-1));
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


ll prime(ll n){
	vector<pair<ll,ll>> res;
    for(ll p=2;p*p<=n;++p){
    	if(n%p!=0) continue;
    	int 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(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  
  ll a,b; cin >> a >> b;
  ll g = __gcd(a,b);
  auto p = prime(g);
  cout << p+1 << endl;
  
}

Compiler output:
a.cc: In function 'll prime(ll)':
a.cc:21:35: error: request for member 'num' in 'p', which is of non-class type 'll' {aka 'long long int'}
   21 |         res.push_back(make_pair(p.num));
      |                                   ^~~
a.cc:24:12: error: cannot convert 'std::vector<std::pair<long long int, long long int> >' to 'll' {aka 'long long int'} in return
   24 |     return res;
      |            ^~~
      |            |
      |            std::vector<std::pair<long long int, long long int> >
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a; i< (int)(b); ++i)
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
typedef long double ld;
using ll=long long;
using namespace std;
const int mod=1e9+7;
const ll inf = 1LL << 60;
const ld pi = (acos(-1));
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


ll prime(){
	vector<pair<ll,ll>> res;
    for(ll p=2;p*p<=n;++p){
    	if(n%p!=0) continue;
    	int 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(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  
  ll a,b; cin >> a >> b;
  ll g = __gcd(a,b);
  auto p = prime(g);
  cout << p+1 << endl;
  
}

Compiler output:
a.cc: In function 'll prime()':
a.cc:17:21: error: 'n' was not declared in this scope
   17 |     for(ll p=2;p*p<=n;++p){
      |                     ^
a.cc:21:35: error: request for member 'num' in 'p', which is of non-class type 'll' {aka 'long long int'}
   21 |         res.push_back(make_pair(p.num));
      |                                   ^~~
a.cc:23:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   23 |     if(n!=1) res.push_back(make_pair(n,1));
      |        ^
      |        yn
a.cc:24:12: error: cannot convert 'std::vector<std::pair<long long int, long long int> >' to 'll' {aka 'long long int'} in return
   24 |     return res;
      |            ^~~
      |            |
      |            std::vector<std::pair<long long int, long long int> >
a.cc: In function 'int main()':
a.cc:34:17: error: too many arguments to function 'll prime()'
   34 |   auto p = prime(g);
      |            ~~~~~^~~
a.cc:15:4: note: declared here
   15 | ll prime(){
      |    ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
vector<long int> primes;
bool v[10e12+5];
void p()
{
    for(long long int i=3; i<=10e6; i+=2)
    {
        for(long long j=i*i; j<=10e12; j+=i)
            v[j]=1;
    }
    primes.push_back(2);
    for(long long int i=3; i<=10e12; i+=2)
        if(v[i]==0)
            primes.push_back(i);
}
long long int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}
int main()
{
    p();
   long long int a,b,c(0);
   cin>>a>>b;
    long long int d=gcd(a,b);
   for(long long int i=0;primes[i]*primes[i]<=d;i++)
   {
       if(d%primes[i]==0)
       {
           while(d%primes[i]==0)
             {
                 d/=primes[i];
             }
           c++;
       }
   }
   if(d!=1)
   {
       c++;
   }

   cout<<c+1<<endl;
}


Compiler output:
a.cc:4:13: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    4 | bool v[10e12+5];
      |        ~~~~~^~
a.cc:4:13: error: could not convert '(1.0e+13 + (double)5)' from 'double' to 'long unsigned int'
    4 | bool v[10e12+5];
      |        ~~~~~^~
      |             |
      |             double
a.cc:4:13: error: size of array 'v' has non-integral type 'double'
Language: C++

#include <iostream>
using namespace std;


long gcd(long a, long b) {
  if (b == 0) return a;
  if (a < b) {
    long tmp = b;
    b = a;
    a = tmp;
  }
  return gcd(b, a % b);
}

long cnt(long g, long v, long d) {
  if (g == 1) return v + 1;
  long res = 0;
  for (long i = 1; i < g ; i++) {
    if (g % i == 0) {
      res = i > res ? i : res;
    }
  }
  long dn = g / res;
  long vn = v;
  if (dn != prev) {
    vn++;
  }
  return cnt(res, vn, dn);
}

int main() {
  long a, b;
  cin >> a >> b;
  long g = gcd(a, b);
  cout << g << ' ' << cnt(g, 0, 0) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'long int cnt(long int, long int, long int)':
a.cc:25:10: error: invalid operands of types 'long int' and '<unresolved overloaded function type>' to binary 'operator!='
   25 |   if (dn != prev) {
      |       ~~~^~~~~~~
Language: C++

#include <iostream>
using namespace std;

long gcd(long a, long b) {
  if (b == 0) return a;
  if (a < b) {
    long tmp = b;
    b = a;
    a = tmp;
  }
  return gcd(b, a % b);
}

long cnt(long g, long v, long d) {
  if (g == 1) return v + 1;
  long res = 0;
  for (long i = 1; i < g ; i++) {
    if (g % i == 0) {
      res = i > res ? i : res;
    }
  }
  long dn = g / res;
  long vn = v;
  if (d != prev) {
    vn++;
  }
  return cnt(res, vn, dn);
}

int main() {
  long a, b;
  cin >> a >> b;
  long g = gcd(a, b);
  cout << cnt(g, 0, 0) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'long int cnt(long int, long int, long int)':
a.cc:24:9: error: invalid operands of types 'long int' and '<unresolved overloaded function type>' to binary 'operator!='
   24 |   if (d != prev) {
      |       ~~^~~~~~~
Language: C++

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

ll countPrimes(ll n)
{
  ll count = 0;
   for (int i=2;i*i<=n;i++)
   {
    　if (n%i==0) //多分ここでTLE????????????????????
     {
       count++;
       while (n%i==0)
         n /= i;
     }
   }
  if (n != 1) count++;
  return (count);
}

int main()
{
  ll a,b;cin>>a>>b;
  ll g = __gcd(a,b);  
  cout<<countPrimes(g)+1<<endl;
}

Compiler output:
a.cc:10:5: error: extended character 　 is not valid in an identifier
   10 |     　if (n%i==0) //多分ここでTLE????????????????????
      |     ^
a.cc: In function 'll countPrimes(ll)':
a.cc:10:5: error: '\U00003000if' was not declared in this scope
   10 |     　if (n%i==0) //多分ここでTLE????????????????????
      |     ^~~~
Language: C++

#include <math.h>
typedef long double ld;
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;

ll GCD (ll a, ll b)
{
     if(a<b){
    ll tmp = a;
    a = b;
    b = tmp;
  }

  /* ユークリッドの互除法 */
  ll r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
    return (b);
}

bool IsPrime(ll 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()
{
    ll a,b;
    cin >> a >> b;
    ll gcd = GCD(a,b);
    ll yaku[gcd];
    int j = 0;
    for (int i = 1; i < gcd + 1; i++)
    {
        if (gcd % i == 0)
        {
            // cout << i << endl;
            yaku[j] = i;
            j++;
        }
    }
   // for (int i = 0; i < j + 1; i++) cout << yaku[i] << endl;
    int count = 0;
    for (int i = 0; i < j + 1; i++)
    {
        if (IsPrime(yaku[i])) count++;
    }
    cout << count + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:5: error: 'cin' was not declared in this scope
   48 |     cin >> a >> b;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <math.h>
  +++ |+#include <iostream>
    2 | typedef long double ld;
a.cc:67:5: error: 'cout' was not declared in this scope
   67 |     cout << count + 1 << endl;
      |     ^~~~
a.cc:67:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:67:26: error: 'endl' was not declared in this scope
   67 |     cout << count + 1 << endl;
      |                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <math.h>
  +++ |+#include <ostream>
    2 | typedef long double ld;
Language: C++

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

ll gcd(ll a, ll b) {
    if (b==0) return a;
    else return gcd(b, a%b);
}
//素因数分解(素因数,何乗か？)
vector<pair<ll,ll>> fact(ll n){
	vector<pair<ll,ll>> res;
	for(ll i=2;i*i<=n;i++){
		if(n%i)continue;
		res.push_back(i,0);//push_back(make_pair(a,b))よりらく
		while(n%i==0){
			n/=i;
			res.back().second++;
		}
	}
	if(n!=1)res.emplace_back(n,1);
	return res;
}

//考察よりgcd(A,B)の素因数を求めればよい
int main() {
	ll a,b,c;
	cin>>a>>b;
	
	c=gcd(a,b);
	auto f=fact(c);
	cout<<f.size()+1<<endl;
	
}


Compiler output:
a.cc: In function 'std::vector<std::pair<long long int, long long int> > fact(ll)':
a.cc:15:30: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(ll&, int)'
   15 |                 res.push_back(i,0);//push_back(make_pair(a,b))よりらく
      |                 ~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 2 provided
Language: C++

int main() {
  ll A, B;
  cin >> A >> B;
  ll Y = gcd(A,B);
  ll i = 2LL;
  ll cnt = 0LL;
  bool can = false;
  while(i<=Y){
    can = false;
    while(Y % i == 0LL){
      can = true;
      Y /= i;
    }
    if(can) cnt++;
    if(i==2LL) i++;
    else if(i==3LL) i+=2LL;
    else if(i%6LL==5LL) i+=2LL;
    else i+=4LL;
  }
  cout << cnt + 1LL << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'll' was not declared in this scope
    2 |   ll A, B;
      |   ^~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> A >> B;
      |   ^~~
a.cc:3:10: error: 'A' was not declared in this scope
    3 |   cin >> A >> B;
      |          ^
a.cc:3:15: error: 'B' was not declared in this scope
    3 |   cin >> A >> B;
      |               ^
a.cc:4:5: error: expected ';' before 'Y'
    4 |   ll Y = gcd(A,B);
      |     ^~
      |     ;
a.cc:5:5: error: expected ';' before 'i'
    5 |   ll i = 2LL;
      |     ^~
      |     ;
a.cc:6:5: error: expected ';' before 'cnt'
    6 |   ll cnt = 0LL;
      |     ^~~~
      |     ;
a.cc:8:9: error: 'i' was not declared in this scope
    8 |   while(i<=Y){
      |         ^
a.cc:8:12: error: 'Y' was not declared in this scope
    8 |   while(i<=Y){
      |            ^
a.cc:14:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |     if(can) cnt++;
      |             ^~~
      |             int
a.cc:20:3: error: 'cout' was not declared in this scope
   20 |   cout << cnt + 1LL << endl;
      |   ^~~~
a.cc:20:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   20 |   cout << cnt + 1LL << endl;
      |           ^~~
      |           int
a.cc:20:24: error: 'endl' was not declared in this scope
   20 |   cout << cnt + 1LL << endl;
      |                        ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b){
   if (a%b == 0){
       return(b);
   }
   else{
       return(gcd(b, a%b));
   }
}
vector<int> erast2(long long N){
  vector<long long>list(N-1);
  vector<long long>primelist;
  for(int i=0;i<N-1;i++){
    list.at(i)=i+2;
  }
  while(list.at(0)==0||list.at(0)<sqrt(N)){
    primelist.push_back(list.at(0));
    vector<long long>list2;
    for(int i=0;i<list.size();i++){
      if(list.at(i)%primelist.at(primelist.size()-1)!=0){
        list2.push_back(list.at(i));
      }
    }
    list=list2;
  }
  return primelist;
}
int main(){
  long long A,B;
  cin>>A>>B;
  if(A==1||B==1){
    cout<<1<<endl;
  }
  else{
    int count=1;
    vector<int>C=erast2(A);
    vector<int>D=erast2(B);
    vector<int>E;
    vector<int>F;
    for(int i=0;i<C.size();i++){
      if(A%C.at(i)==0){
        E.push_back(C.at(i));
      }
    }
    for(int i=0;i<D.size();i++){
      if(B%D.at(i)==0){
        F.push_back(D.at(i));
      }
    }
    for(int i=0;i<E.size();i++){
      for(int j=0;j<F.size();j++){
        if(E.at(i)==F.at(j)){
          count=count+1;
        }
      }
    }
    cout<<count<<endl;
  }
}

Compiler output:
a.cc: In function 'std::vector<int> erast2(long long int)':
a.cc:27:10: error: could not convert 'primelist' from 'vector<long long int>' to 'vector<int>'
   27 |   return primelist;
      |          ^~~~~~~~~
      |          |
      |          vector<long long int>
Language: Java

{
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long max = Math.max(a,b);
        long min = Math.min(a,b);
        HashSet<Long> maxl = getPrimeFactorization(max);
        HashSet<Long> minl = getPrimeFactorization(min);
        int prime = 1;
        for(long p : maxl){
            if(minl.contains(p)){
                prime++;
            }
        }
        System.out.println(prime);
    }

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
{
^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
        long a = sc.nextLong();
        ^
  (use --enable-preview to enable unnamed classes)
Main.java:10: error: class, interface, enum, or record expected
        for(long p : maxl){
        ^
Main.java:13: error: class, interface, enum, or record expected
            }
            ^
Main.java:16: error: class, interface, enum, or record expected
    }
    ^
5 errors
Language: C++

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

int main(){
  long long A,B; cin >> A >> B;
  
  set<long long> Ad,Bd;
  for(long long i=1; i<=sqrt(A); i++){
    if(A%i==0){
      Ad.push(i);
      if(i!=A/i) Ad.push(A/i);
    }
  }
  for(long long i=1; i<=sqrt(B); i++){
    if(B%i==0){
      Bd.push(i);
      if(i!=B/i) Bd.push(B/i);
    }
  }
  
  priority_queue<long long> Cd;
  while((!Ad.empty())&&(!Bd.empty())){
    if(Ad.top()==Bd.top()){
      Cd.push(Ad.top());
      Ad.pop();
      Bd.pop();
    }else if(Ad.top()<Bd.top()){
      Bd.pop();
    }else{
      Ad.pop();
    }
  }
  
  long long count=0;
  while(!Cd.empty()){
    long long d=Cd.top();
    bool f=true;
    for(long long j=2; j<=sqrt(d); j++){
      if(d%j==0){
        f=false;
        break;
      }
    }
    count+=(f?1:0);
    Cd.pop();
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'class std::set<long long int>' has no member named 'push'
   10 |       Ad.push(i);
      |          ^~~~
a.cc:11:21: error: 'class std::set<long long int>' has no member named 'push'
   11 |       if(i!=A/i) Ad.push(A/i);
      |                     ^~~~
a.cc:16:10: error: 'class std::set<long long int>' has no member named 'push'
   16 |       Bd.push(i);
      |          ^~~~
a.cc:17:21: error: 'class std::set<long long int>' has no member named 'push'
   17 |       if(i!=B/i) Bd.push(B/i);
      |                     ^~~~
a.cc:23:11: error: 'class std::set<long long int>' has no member named 'top'
   23 |     if(Ad.top()==Bd.top()){
      |           ^~~
a.cc:23:21: error: 'class std::set<long long int>' has no member named 'top'
   23 |     if(Ad.top()==Bd.top()){
      |                     ^~~
a.cc:24:18: error: 'class std::set<long long int>' has no member named 'top'
   24 |       Cd.push(Ad.top());
      |                  ^~~
a.cc:25:10: error: 'class std::set<long long int>' has no member named 'pop'
   25 |       Ad.pop();
      |          ^~~
a.cc:26:10: error: 'class std::set<long long int>' has no member named 'pop'
   26 |       Bd.pop();
      |          ^~~
a.cc:27:17: error: 'class std::set<long long int>' has no member named 'top'
   27 |     }else if(Ad.top()<Bd.top()){
      |                 ^~~
a.cc:27:26: error: 'class std::set<long long int>' has no member named 'top'
   27 |     }else if(Ad.top()<Bd.top()){
      |                          ^~~
a.cc:28:10: error: 'class std::set<long long int>' has no member named 'pop'
   28 |       Bd.pop();
      |          ^~~
a.cc:30:10: error: 'class std::set<long long int>' has no member named 'pop'
   30 |       Ad.pop();
      |          ^~~
Language: C

#include <iostream>

using namespace std;

long long e_gcd(long long a, long long b)
{
    if (a % b == 0)
    {
        return b;
    }else
    {
        return (e_gcd(b, a % b));
    }
    
}

int main(int argc, char const *argv[])
{
    long long A, B;
    cin >> A >> B;
    long long n = e_gcd(B, A);
    long long cnt = 1;
    for (long long i = 2; i * i <= n ; i++)
    {
        if (n == 1) break;
        if (n % i != 0) continue;
        while (n % i == 0)
        {
            n /= i;
        }
        cnt += 1;
    }

    cout << cnt << 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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0; (i)<(n); (i)++)
typedef long long ll;

int main(){
	int A,B;
	cin >> A >> B;
	ll gcd = __gcd(A,B);
	ll t = gcd;
	ll ans = 1;
	for(int i=2; i<=1e6; i++){if(c%i!=0)continue;while(c%i==0)c/=i;ans++;}
	cout << ans + (t>1)<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: 'c' was not declared in this scope
   12 |         for(int i=2; i<=1e6; i++){if(c%i!=0)continue;while(c%i==0)c/=i;ans++;}
      |                                      ^
a.cc:12:60: error: 'c' was not declared in this scope
   12 |         for(int i=2; i<=1e6; i++){if(c%i!=0)continue;while(c%i==0)c/=i;ans++;}
      |                                                            ^
Language: C++

import math
import collections
A,B = map(int,input().split())
GCD = math.gcd(A,B)

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

Bunkai = factorization(GCD) 
print(len(Bunkai) + 1)

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

import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long x = lcm(a,b);
        List<Long> li = fact(x);
        long ans = ((li.size()*li.size())-li.size())/2;
        System.out.pritnln(ans);
    }

    static List<Long> fact(long x) {
        HashSet<Long> result = new HashSet<>();
        while (x >= 4 && x % 2 == 0) {
            result.add(2);
            x /= 2;
        }
        int d = 3;
        int q = x / d;
        while (q >= d) {
            if (x % d == 0) {
                result.add(d);
                x = q;
            } else {
                d += 2;
            }
            q = x / d;
        }
        result.add(x);
        return result;
    }

    private static long gcd(long a, long b)
    {
        while (b > 0)
        {
            long temp = b;
            b = a % b; // % is remainder
            a = temp;
        }
        return a;
    }

    private static long lcm(long a, long b)
    {
        return a * (b / gcd(a, b));
    }

}


Compiler output:
Main.java:13: error: cannot find symbol
        System.out.pritnln(ans);
                  ^
  symbol:   method pritnln(long)
  location: variable out of type PrintStream
Main.java:19: error: incompatible types: int cannot be converted to Long
            result.add(2);
                       ^
Main.java:23: error: incompatible types: possible lossy conversion from long to int
        int q = x / d;
                  ^
Main.java:26: error: incompatible types: int cannot be converted to Long
                result.add(d);
                           ^
Main.java:31: error: incompatible types: possible lossy conversion from long to int
            q = x / d;
                  ^
Main.java:34: error: incompatible types: HashSet<Long> cannot be converted to List<Long>
        return result;
               ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
6 errors
Language: C++

#include <iostream>
#include <set>
 
using namespace std;
using ll = long long;
 
ll gcd (ll a, ll b) {
    return (b==0)? a : gcd(b, a%b);
}
 
int main() {
    ll a, b;
    cin >> a >> b;
    ll c = gcd(a, b);
    //cout << c << endl;
    ll count=1;
    for (ll i=2, n=c; i*i <= n; ++i) {
        if (n%i == 0) {
            ++count;
            //cout << i << endl;
        }
        while (n%i == 0) {
            n = n/i;
        }
    }
    if (n!=1) ++count;
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'n' was not declared in this scope
   26 |     if (n!=1) ++count;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#define pb push_back
#define pp() pop_back()
#define V vector
#define P pair
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(),a.end()),a.end())
#define Q queue
#define pri priority_queue
#define Pri priority_queue<int,vector<int>,greater<int>>
#define PriP priority_queue<P<int,int>,vector<P<int,int>>,greater<P<int,int>>>
#define ff first.first
#define fs first.second
#define sf second.first
#define ss second.second
#define all(a)  (a).begin(),(a).end()
#define elif else if
int low(V<int> a,int b){
  decltype(a)::iterator c=lower_bound(a.begin(),a.end(),b);
  int d=c-a.bgn;
  return d;
}
int upp(V<int> a,int b){
  decltype(a)::iterator c=upper_bound(a.begin(),a.end(),b);
  int d=c-a.bgn;
  return d;
}
template<class T>
 void cou(vector<vector<T>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
int wari(int a,int b) {
  if(a%b==0)
    return a/b;
  else
    return a/b+1;
}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int souwa(int a){
  return a*(a+1)/2;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int ketas(int a){
  string b=to_string(a);
  int c=0;
  fo(i,keta(a)){
    c+=b[i]-'0';
  }
  return c;
}
int INF=1000000007;
int kaijou(int a){
  int b=1;
  fo(i,a)
    b*=i+1;
  return b;
}
int nPr(int a,int b){
  if(a<b)
    return 0;
  if(b==0)
    return 1;
  int c=1;
  for(int i=a;i>a-b;i--){
    c*=i;
    c%=INF;
  }
  return c;
}
int lcm(int a,int b){
  int c=modinv(gcd(a,b),INF);
  return ((a*c)%INF)*(b%INF)%INF;
}
int MOD=INF;



const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

V<P<int,int>> factorize(int n){
  V<P<int,int>> res;
  for(int i=2; i*i<=n; i++){
    if(n%i)
      continue;
    res.emplace_back(i,0);
    while(n%i==0){
      n/=i;
      res.back().second++;
    }
  }
  if(n!=1)
    res.emplaca_back(n,1);
  return res;
}

signed main(){
  int a,b;
  cin>>a>>b;
  int g=gcd(a,b);
  auto f=factorize(g);
  int ans=f.size()+1;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'long long int lcm(long long int, long long int)':
a.cc:101:9: error: 'modinv' was not declared in this scope
  101 |   int c=modinv(gcd(a,b),INF);
      |         ^~~~~~
a.cc: In function 'std::vector<std::pair<long long int, long long int> > factorize(long long int)':
a.cc:123:9: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'emplaca_back'; did you mean 'emplace_back'?
  123 |     res.emplaca_back(n,1);
      |         ^~~~~~~~~~~~
      |         emplace_back
Language: C++

#include <bits/stdc++.h>
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rrep(i, n) for(int i = ((int)(n)-1); i >= 0; i--)
#define all(x) (x).begin(),(x).end()
 
using namespace std;
using ll = long long;
 
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

struct edge { int to; int cost; };
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> P;
 
const int INF = 1e9;
const int MOD = 1e9+7;
const double EPS = 1.0e-10;
const double PI = acos(-1.0);
 
const int mx4[] = {0,1,0,-1};
const int my4[] = {1,0,-1,0};
const int mx8[] = {0,1,1,1,0,-1,-1,-1};
const int my8[] = {1,1,0,-1,-1,-1,0,1};

const int MAX = 1e6+10;

int main(){
	ll a,b;
	cin >> a >> b;
	c.push_back(1);
	for(ll i = 2; i*i <= max(a,b); i++){
		if(a%i == 0 && b%i == 0){
			c.push_back(i);
			while(a%i == 0) a /= i;
			while(b%i == 0) b /= i;
			/*while(a%i == 0 && b%i == 0){
				a /= i;
				b /= i;
			}*/
		}
	}

	if(a == b && a != 1){
		c.push_back(a);
	}

	//for(auto cc : c) cout << cc << endl;
	cout << c.size() << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: 'c' was not declared in this scope
   36 |         c.push_back(1);
      |         ^
Language: C++

//INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
//CONST
//------------------------------------------
#define INF 1010000000000000017LL
#define MOD 1000000007LL
#define EPS 1e-12
#define PI 3.14159265358979323846
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
//-----------------------------------------
#define ifYN(x) cout<<(x?"Yes":"No")<<"\n" 
#define dcml(n) fixed<<setprecision(n)

 
ll GCD(ll a,ll b) { return b ? GCD(b,a%b) : a; } 
ll LCM(ll a,ll b) { return a/GCD(a,b)*b; } 
ll Factorial(ll n){ ll m=1;while(n>=1)m*=n--;return m; } 
ll modPow(ll x,ll n,ll mod=MOD){ 
    return (!n?1:!n%2?modPow(x*x,n/2,mod)%mod:x%mod*modPow(x,n-1,mod)%mod); 
} 



using namespace std;
//-------------------------------------------
typedef pair<ll,ll> P;
int main(void){
    ll A,B;cin>>A>>B;
    ll n=GCD(A,B);
    ll cnt=0;
    REPS(i,n){
        ll k=0;
        while(n%i==0)n/=i,k=1;
        x+=k;
    }
    cout<<cnt<<"\n";
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:9: error: 'x' was not declared in this scope
   51 |         x+=k;
      |         ^
Language: C++

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

long long diva(long long x,long long y){
    long long ans;
    while(y>=1){
        if(y>x){
            swap(x,y);
        }
        if(x%y == 0){
            ans = y;
            break;
        }
        if(y == 1){
            ans = 1;
            break;
        }
        x = x%y;
    }
   	return ans;
}

int main(){
    long long A,B;
    long long ans=1ll;
    cin >> A >> B;
    long long C =diva(A,B);;
  	long long C1 = C;
    for(long long i=2;i<= C1;i++){
        if(C%i == 0){
          ans++;
        }
        while(C%i == 0){
          C /=i;
        }
      	if(C == 1){
          break;
        }  
    }
    cout << ans << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'long long int diva(long long int, long long int)':
a.cc:8:13: error: 'swap' was not declared in this scope
    8 |             swap(x,y);
      |             ^~~~
a.cc: In function 'int main()':
a.cc:26:5: error: 'cin' was not declared in this scope
   26 |     cin >> A >> B;
      |     ^~~
a.cc:40:5: error: 'cout' was not declared in this scope
   40 |     cout << ans << endl;
      |     ^~~~
a.cc:40:20: error: 'endl' was not declared in this scope
   40 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#include<iomanip>

#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using ll = long long;
namespace mp = boost::multiprecision;
using mpint = mp::cpp_int; // 多倍長整数（任意精度）

/*
 * 定数
 */
const long double PI = (acos(-1));
const long double EPS = 1e-10;
const long long INF = 1e18;

/*
 * データ変換 
 */
/* char -> int */
int ctoi(char c) { return (int)(c - '0'); }

/*
 * 数学的な計算
 */
/* 階乗 */
int factorial(int n){ int ret = 1; for(int i = 1; i < n + 1; ++i) { ret = ret * i; } return ret; }

/* 最大公約数 */
template <typename T>T gcd(T x, T y){ return x % y == 0 ? y : gcd(y, x % y); }

/* 最小公倍数 */
template <typename T>T lcm(T a, T b) { return a * b / gcd(a, b); }

/* n個の整数の最小公倍数 */
template <typename T>T lcm_n(vector<T> &numbers) { T l; l = numbers[0]; for(int i = 1; i < numbers.size(); ++i) { l = lcm(l, numbers[i]); } return l; }

/*
 * DP向け
 */
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

vector<ll> divisors(ll n) {
    vector<ll> res;
    for(ll i = 1; i*i <= n; ++i) {
        if(n % i != 0) continue;
        res.push_back(i);
        if(n/i == i) continue;
        res.push_back(n/i);
    }
    return res;
}

const ll MAXN = 10'000'000;

ll prime[MAXN]; // n 以下の素数のうち i 番目の素数
bool is_prime[MAXN]; // 整数 i が素数であるかどうか

ll list_prime(int n) {
    ll res = 0;
    fill(is_prime, is_prime + MAXN, true);
    is_prime[0] = is_prime[1] = false;
    for(ll i = 2; i <= n; ++i) {
        if(!is_prime[i]) continue;
        prime[res++] = i;
        for(int j = 2 * i; j <= n; j += i) is_prime[j] = false;
    }
    return res;
}

map<ll, ll> prime_factors(ll n) {
    map<ll, ll> res;
    if(n == 1) { // n=1 の素因数分解は n^1
        res[n] = 1;
        return res;
    }
    for(ll i = 2, _n = n; i*i <= _n; ++i) {
        while(n % i == 0) {
            ++res[i]; // 素数i^{res[i]}
            n /= i;
        }
    }
    if(n != 1) res[n] = 1;
    return res;
}

int main(){
  int a, b;
  cin >> a >> b;

  map<ll, ll> p_a = prime_factors(a);
  map<ll, ll> p_b = prime_factors(b);

  vector<ll> d_a, d_b;

  for(auto itr = p_a.begin(), end = p_a.end(); itr != end; ++itr) {
    d_a.push_back(itr->first);
  }

  for(auto itr = p_b.begin(), end = p_b.end(); itr != end; ++itr) {
    d_b.push_back(itr->first);
  }

  ll j = 0;
  ll ans = 1;
  for(ll i = 0; i < p_a.size(); ++i){
    if(d_a[i] == d_b[j]) {
        ++ans;
    }
    while(d_b[j] < d_a[i]){
      ++j;
      if(d_a[i] == d_b[j]) {
        ++ans;
      }
    }
  }

  // for(auto v : d_a) cout << v << endl;

  // for(auto v : d_b) cout << v << endl;

  // cout << "===" << endl;
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc:10:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   10 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++







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

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
//vector<vector<int>> z(n,vector<int>(2));
//n番目から数えてm個の文字列をXに置換したい場合はreplace(n,m,X) teWttest
//s1.substr(3,3);
//n番目以降の文字列をm個取り出す、上だとtte

int main(){
  ll a,b;
  cin>>a>>b;

  ll c;
  c=gcd(a,b);
  vector<pair<ll int>> res;

  for(ll i=2;i*i<=c;i++){
  //  cout<<i<<endl;
    if(c%i)continue;
    res.push_back(make_pair(i,0));
    while (c%i==0){
      c/=i;
      res.back().second++;
    }
  }
  if (c!=1) res.push_back(make_pair(c,1));
  ll ans;
  ans=res.size()+1;
  cout<<ans;


  }


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: two or more data types in declaration of 'type name'
   26 |   vector<pair<ll int>> res;
      |               ^~
a.cc:26:18: error: wrong number of template arguments (1, should be 2)
   26 |   vector<pair<ll int>> res;
      |                  ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:7:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:26:21: error: template argument 1 is invalid
   26 |   vector<pair<ll int>> res;
      |                     ^~
a.cc:26:21: error: template argument 2 is invalid
a.cc:31:9: error: request for member 'push_back' in 'res', which is of non-class type 'int'
   31 |     res.push_back(make_pair(i,0));
      |         ^~~~~~~~~
a.cc:34:11: error: request for member 'back' in 'res', which is of non-class type 'int'
   34 |       res.back().second++;
      |           ^~~~
a.cc:37:17: error: request for member 'push_back' in 'res', which is of non-class type 'int'
   37 |   if (c!=1) res.push_back(make_pair(c,1));
      |                 ^~~~~~~~~
a.cc:39:11: error: request for member 'size' in 'res', which is of non-class type 'int'
   39 |   ans=res.size()+1;
      |           ^~~~