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

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define for_p(i, a, b) for(int i = a; i < b; i++)
#define for_m(i, a, b) for(int i = a - 1; i >= b; i--)

//a = s1.size();
//vector<string> s1;
//string s2 = accumulate( s1.begin(), s1.end(), string() );

using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0;
  int h = 0, o = 0, p = 0, q = 0;
  int tmp;
  int i = 0, j = 0, k = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[100000], a2[512], a3[1024];
  int so[1000000];
  char s1[200000], s2[200000], s3[200000];
  int tmp = 0;
  
  cin >> a >> b;
  
   /* 自然数 a > b を確認・入替 */
  if(a < b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  i = 0;
  c = a % b;
  c = so[i];
  i++;
  while(c != 0){
    a = b;
    b = c;
    c = a % b;
    c = so[i];
    i++;
  }
  
    
  
  
  int coprime(int a, int b) {
    return gcd(a, b);
  }

  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], b[k]) == 1)){
        if(so[j] >= so[k]){
          f = so[j];
        }else{
          f = so[k];
        }
    }
  cout << f << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:35:7: error: redeclaration of 'int tmp'
   35 |   int tmp = 0;
      |       ^~~
a.cc:29:7: note: 'int tmp' previously declared here
   29 |   int tmp;
      |       ^~~
a.cc:62:29: error: a function-definition is not allowed here before '{' token
   62 |   int coprime(int a, int b) {
      |                             ^
a.cc:69:26: error: invalid types 'int[int]' for array subscript
   69 |       if(coprime(so[j], b[k]) == 1)){
      |                          ^
a.cc:69:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   69 |       if(coprime(so[j], b[k]) == 1)){
      |          ^~~~~~~
      |          ctime
a.cc:69:36: error: expected primary-expression before ')' token
   69 |       if(coprime(so[j], b[k]) == 1)){
      |                                    ^
a.cc:77:2: error: expected '}' at end of input
   77 | }
      |  ^
a.cc:67:30: note: to match this '{'
   67 |   for(j = 0; j <= i - 1; j++){
      |                              ^
a.cc:77:2: error: expected '}' at end of input
   77 | }
      |  ^
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define for_p(i, a, b) for(int i = a; i < b; i++)
#define for_m(i, a, b) for(int i = a - 1; i >= b; i--)

//a = s1.size();
//vector<string> s1;
//string s2 = accumulate( s1.begin(), s1.end(), string() );

using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0;
  int h = 0; o = 0; p = 0; q = 0;
  int tmp;
  int i = 0, j = 0, k = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[100000], a2[512], a3[1024];
  int so[1000000];
  char s1[200000], s2[200000], s3[200000];
  int tmp = 0;
  
  cin >> a >> b;
  
   /* 自然数 a > b を確認・入替 */
  if(a < b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  i = 0;
  c = a % b;
  c = so[i];
  i++;
  while(c != 0){
    a = b;
    b = c;
    c = a % b;
    c = so[i];
    i++;
  }
  
    
  
  
  int coprime(int a, int b) {
    return gcd(a, b);
  }

  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], b[k]) == 1)){
        if(so[j] >= so[k]){
          f = so[j];
        }else{
          f = so[k];
        }
    }
  cout << f << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: 'o' was not declared in this scope
   28 |   int h = 0; o = 0; p = 0; q = 0;
      |              ^
a.cc:28:21: error: 'p' was not declared in this scope
   28 |   int h = 0; o = 0; p = 0; q = 0;
      |                     ^
a.cc:28:28: error: 'q' was not declared in this scope
   28 |   int h = 0; o = 0; p = 0; q = 0;
      |                            ^
a.cc:35:7: error: redeclaration of 'int tmp'
   35 |   int tmp = 0;
      |       ^~~
a.cc:29:7: note: 'int tmp' previously declared here
   29 |   int tmp;
      |       ^~~
a.cc:62:29: error: a function-definition is not allowed here before '{' token
   62 |   int coprime(int a, int b) {
      |                             ^
a.cc:69:26: error: invalid types 'int[int]' for array subscript
   69 |       if(coprime(so[j], b[k]) == 1)){
      |                          ^
a.cc:69:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   69 |       if(coprime(so[j], b[k]) == 1)){
      |          ^~~~~~~
      |          ctime
a.cc:69:36: error: expected primary-expression before ')' token
   69 |       if(coprime(so[j], b[k]) == 1)){
      |                                    ^
a.cc:77:2: error: expected '}' at end of input
   77 | }
      |  ^
a.cc:67:30: note: to match this '{'
   67 |   for(j = 0; j <= i - 1; j++){
      |                              ^
a.cc:77:2: error: expected '}' at end of input
   77 | }
      |  ^
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int c[100000000];

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

bool IsPrime(int n)
{
	if (n < 2)
		return false;
	else if (n == 2)
		return true;

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

	for (int i = 3; i <= sqrt(n); i += 2) {
		if (n % i == 0)
			return false;
	}
	return true;
}

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

	if (a < b) {
		swap(a, b);
	}
	long long gcdAB = gcd(a, b);

	int cnt = 0;
	int j = 0;
	for (int i = 1; i <= gcdAB; i++) {
		if (gcdAB % i == 0) {
			c[j] = i;
			if ((c[j] == 1) || (IsPrime(c[j])))
				cnt++;
			j++;
		}
	}

	cout << cnt << endl;

	return 0;
}

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:23:30: error: 'sqrt' was not declared in this scope
   23 |         for (int i = 3; i <= sqrt(n); i += 2) {
      |                              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
  long long a,b,c;
  cin >> a >> b;
  while(a%b!=0){
    c=a-b;
    a=b;
    b=c;
  }
  int k=0;
  long long d = 1;
  long long q = sqrt( b );
  for(i=2;i<q;i++){
    while(b%i==0){
      b/i;
      k=1;
    }
    if(k==1){
      k=0;
      d++;
    }
  }
  cout << d << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=2;i<q;i++){
      |       ^
Language: C++

// CPP program to count common prime factors 
// of a and b. 
#include <bits/stdc++.h> 
using namespace std; 
#define int long  long int
// A function to count all prime factors of 
// a given number x 
int countPrimeFactors(int x) 
{ 
	int res = 0; 
	if (x % 2 == 0) { 
		res++; 

		// Print the number of 2s that divide x 
		while (x % 2 == 0) 
			x = x / 2; 
	} 

	// x must be odd at this point. So we 
	// can skip one element (Note i = i +2) 
	for (int i = 3; i <= sqrt(x); i = i + 2) { 
		if (x % i == 0) { 

			// While i divides x, print i and 
			// divide x 
			res++; 
			while (x % i == 0) 
				x = x / i; 
		} 
	} 

	// This condition is to handle the case 
	// when x is a prime number greater than 2 
	if (x > 2) 
		res++; 
	return res; 
} 

// Count of common prime factors 
int countCommonPrimeFactors(int a, int b) 
{ 
	// Get the GCD of the given numbers 
	int gcd = __gcd(a, b); 

	// Count prime factors in GCD 
	return countPrimeFactors(gcd); 
} 

// Driver code 
int main() 
{ 
	int a,b;
	cin>>a>>b;
	int ans= countCommonPrimeFactors(a, b); 
	ans++;
	cout<<ans<<endl;
	return 0; 
} 


Compiler output:
a.cc:5:24: error: '::main' must return 'int'
    5 | #define int long  long int
      |                        ^~~
a.cc:50:1: note: in expansion of macro 'int'
   50 | int main()
      | ^~~
Language: C++

#include <bits/stdc+++.h>
using namespace std;
int main()
{
	int a,b;
	cin>>a>>b;
	cout<<1<<endl;
	return 0;
}

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

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

bool sosuJudge(unsigned long number){
    /* 判定フラグ */
    bool flag = false;
    unsigned long i;
    
    /* 素数かどうかを判定 */
    for( i=2;i <= (number >> 1);++i ) {
        if( number % i==0 ) {
            flag = true;
            break;
        }
    }
    
    if(flag == false){//素数
        return true;
    }else{
        return false;
    }
}

int main(void){
    unsigned long i,j;
    unsigned long A,B,index = 1;//,box[10000000]
    int answer = 0;
   
    scanf("%ld %ld",&A,&B);
    
    unsigned long a,b,c;
    a = A;
    b = B;
    c=a;
    if(a>b)c=b;
    for(i=2;i<=c;i++){
        if(a%i==0 && b%i==0 && sosuJudge(i)){
            //box[index] = i;
            index++;
            //printf("%lu\n",i);
        }
    }
    
    printf("%lu\n",index);
    
    ret

Compiler output:
main.c: In function 'main':
main.c:48:5: error: 'ret' undeclared (first use in this function)
   48 |     ret
      |     ^~~
main.c:48:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:48:8: error: expected ';' at end of input
   48 |     ret
      |        ^
      |        ;
main.c:48:5: error: expected declaration or statement at end of input
   48 |     ret
      |     ^~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using mapis = unordered_map<Int,string>;
using mapii = unordered_map<Int,Int>;
using pii = pair<Int,Int>;

Int GCD(Int a, Int b){
    if(b==0) return a;
    if(a < b) return GCD(b, a);
    unsigned r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}

Int modinv(Int a, Int m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

Int binary_search_index(Int Y, vi &q){
    int left = 0, right = q.size() - 1;
    while (right >= left) {
        int mid = left + (right - left) / 2;
        if (q[mid] == Y) return mid;
        else if (q[mid] > Y) right = mid - 1;
        else if (q[mid] < Y) left = mid + 1;
    }
    return -1;
}

bool compare_by_b(pair<int, int> a, pair<int, int> b) {
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        return a.first < b.first;
    }
}

int root_sum(int target, vi &parents, vi &nodes_value, vi &memo, int sum){
    if(memo[target] != -1){
        sum += memo[target];
        return sum;
    }
    if (parents[target] == target){
        sum+=nodes_value[target];
        return sum;
    }else{
        sum+=nodes_value[target];
        return root_sum(parents[target],parents, nodes_value, memo, sum);
    }
}

// memoには数え上げた素数を入れていく
bool is

Compiler output:
a.cc:85:8: error: expected initializer at end of input
   85 | bool is
      |        ^
Language: C++


# include <bits/stdc++.h>
# define pb push_back
# define ll long long
# define fi first
# define se second
# define all(vc) vc.begin(),vc.end()
# define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
# define DEBUG

using namespace std;

ll Gcd(ll a, ll b)
{
    while (a != 0 && b != 0)
    {
        if (a > b)
            a %= b;
        else
            b %= a;
    }

    return a == 0 ? b : a;
}

int Calc(ll v)
{
    int count = 0;
    
    for (int i = 2; i * i < value; i++)
    {
        if (value % i > 0) continue;
        while (value % i == 0)
        {
            value /= i;
        }

        count++;
    }

    if (value > 1) count++;

    return count;
}




int main()
{
    ll A;
    ll B;

    cin >> A;
    cin >> B;

    ll gcd = Gcd(A, B);

    int ans = Calc(gcd);

    cout << ans;
}



Compiler output:
a.cc: In function 'int Calc(long long int)':
a.cc:30:29: error: 'value' was not declared in this scope
   30 |     for (int i = 2; i * i < value; i++)
      |                             ^~~~~
a.cc:41:9: error: 'value' was not declared in this scope
   41 |     if (value > 1) count++;
      |         ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define rep2(r, aa, bb) for (ll r = (aa)-1; r >= (bb); r--)
#define be(x) (x.begin(), x.end())
#define pb(t) push_back(t)
#define ll long long
#define mp(a, b) make_pair(a, b)
ll main()
{
    ll a,b, ans=0;
    cin>>a>>b;
    ll v=__gcd(a,b);
    rep(i,2,sqrt(v)+1)
    {
        bool t = false;
        while (v % i == 0)
        {
            v /= i;
            if (!t)
            {
                ans += 1;
            }
            t = true;
        }
    }
    if (v > 1)
    {
        ans += 1;
    }
    cout << ans;
}
// #include <bits/stdc++.h>
// using namespace std;
// #define rep(i, a, b) for (ll i = (a); i < (b); i++)
// #define rep2(r, aa, bb) for (ll r = (aa)-1; r >= (bb); r--)
// #define be(x) (x.begin(), x.end())
// #define pb(t) push_back(t)
// #define ll long long
// #define mp(a, b) make_pair(a, b)
// ll checkPrimeNumber(ll n)
// {
//     bool flag = false;

//     for (ll i = 2; i <=sqrt(n); ++i)
//     {
//         if (n % i == 0)
//         {
//             flag = true;
//             break;
//         }
//     }
//     return flag;
// }
// ll main()
// {
//     ll a, b;
//     cin>>a>>b;
//     vector<ll> A;
//     rep(i,2,sqrt(__gcd(a,b)+4))
//     {
//         if(checkPrimeNumber(i))continue;
//         if(__gcd(a,b)%i==0)A.pb(i);
//     }
//     cout<<A.size()+1<<endl;
// }

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


# include <bits/stdc++.h>
# define pb push_back
# define ll long long
# define fi first
# define se second
# define all(vc) vc.begin(),vc.end()
# define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
# define DEBUG

using namespace std;

int main()
{
    ll A;
    ll B;

    cin >> A;
    cin >> B;

    ll gcd = Gcd(A, B);

    int ans = Calc(gcd);

    cout << ans;
}

ll Gcd(ll a, ll b)
{
    while (a != 0 && b != 0)
    {
        if (a > b)
            a %= b;
        else
            b %= a;
    }

    return a == 0 ? b : a;
}

int Calc(ll v)
{
    int count = 0;
    
    for (int i = 2; i * i < value; i++)
    {
        if (value % i > 0) continue;
        while (value % i == 0)
        {
            value /= i;
        }

        count++;
    }

    if (value > 1) count++;

    return count;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: 'Gcd' was not declared in this scope; did you mean 'gcd'?
   21 |     ll gcd = Gcd(A, B);
      |              ^~~
      |              gcd
a.cc:23:15: error: 'Calc' was not declared in this scope
   23 |     int ans = Calc(gcd);
      |               ^~~~
a.cc: In function 'int Calc(long long int)':
a.cc:45:29: error: 'value' was not declared in this scope
   45 |     for (int i = 2; i * i < value; i++)
      |                             ^~~~~
a.cc:56:9: error: 'value' was not declared in this scope
   56 |     if (value > 1) count++;
      |         ^~~~~
Language: C++

#define MOD 1000000007
#define PI 3.14159265358979323846
#define inf 100000000000000
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define ALL(V) V.begin(), V.end()
#define sz(V) (int)V.size()
//#define int long long
#define _ <<" "<<
#define forn(i, n)             for(int i = 0; i < n; i ++)
#define forn1(i, n)            for(int i = 1; i <= n; i ++)
#include <bits/stdc++.h>
 
 
using namespace std;
 
typedef long long int ll;
typedef vector <int> vi;
typedef vector<vi> vvi;
typedef pair <int, int> ii;
typedef pair<int, pair<int,int> > iii;
typedef vector<ii> vii;
#define int long long


signed main() {
 
   
    
    ios::sync_with_stdio(0); cin.tie(0);
    cout.tie(0);
    //freopen("test.txt" ,"r", stdin);
    int a,b;
    cin>>a>>b;

    vector<int> va,vb;
    for(int i=1;i*i <= a;i++)
    {
        if(a%i == 0){
            va.pb(i);
            va.pb((a/i));
        }
    }

    // forn(i,va.size())cout<<va[i]<<" ";
    // cout<<endl;

    for(int i=0;i<va.size();i++)
    {
        if(b % va[i] == 0)vb.pb(va[i]);
    }
    //cout<<vb.size();
	if(vb.size == 0){
      cout<<0;return 0;
    }

    sort(ALL(vb));
    vb.erase(unique(ALL(vb)) , vb.end());

    // forn(i,vb.size())cout<<vb[i]<<" ";
    // cout<<endl;
    int imp[vb.size()] = {0};


    for(int i=1;i<vb.size();i++)
    {
        for(int j=i+1;j<vb.size();j++)
        {
            if(vb[j] % vb[i] == 0)imp[j] =1;
        }
    }

    int ans =1;
    for(int i=1;i<vb.size();i++)
        if(imp[i] == 0)ans++;

    cout<<ans;

    
    //cout<<ans;

    // int ans = 0;

    // for(int i=0;i<va.size();i++)
    // {
    //     for(int j=0;j<vb.size();j++)
    //     {
    //         if(__gcd(va[i],vb[j]) == 1)ans++;
    //     }
    // }
    // cout<<ans;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:15: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = long long int; _Alloc = std::allocator<long long int>; size_type = long unsigned int]' (did you forget the '()' ?)
   56 |         if(vb.size == 0){
      |            ~~~^~~~
      |                   ()
Language: C++

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

int main() {
    int64_t A, B, s, i = 1, ans = 1;
    cin >> A >> B;
    s = __gcd(A,B);
    while (s > 1 && i * i <= s {
        i++;
        if (s % i == 0) {
            ans++;
        }
        while (s % i == 0) {
            s /= i; 
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected ')' before '{' token
    8 |     while (s > 1 && i * i <= s {
      |           ~                   ^~
      |                               )
Language: C

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

int main(void){
    long long A, B, N, x, i, t, p[20], c, d;
    scanf("%lld%lld", &A, &B);
    if (A>B) {
        t=A;
        A=B;
        B=t;
    }
    N=(long long)(floor(sqrt(A)));
    c=0;
    for (i=2; i<=N; i++) {
        d=0;
        while (1) {
            if (A%i==0) {
                if (d==0) {
                    c++;
                    p[c]=i;
                    d=1;
                    // printf("!(%lld, %lld)\n", A, i);
                }
                A/=i;
                // printf("?(%lld, %lld)\n", A, i);
            }
            else break;
            // printf("(%lld, %lld)\n", i, A%i);
        }
    }
    // for (i=1; i<=c; i++) printf("%lld\n", p[i]);
    x=0;
    for (i=1; i<=c; i++) {
        if (B%p[i]==0) x++;
    }
    printf("%lld", x+1);
    return 0;
}

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

public static void main(String[] args) {

//		long ans2 = 0;
		long ans = 0;

		Scanner sc = new Scanner(System.in);
		long  a = sc.nextLong();
		long  b = sc.nextLong();

//		int  k = sc.nextInt();
//		long d = sc.nextLong();

//		String string = sc.next();
//		StringBuilder s = new StringBuilder(string);

//		boolean f = true;
//
//		int[] a = new int[n];
//		int[] b = new int[n];
//		for (int i = 0; i < n; i++) {
//			a[i] = sc.nextInt();
//			b[i] = 0;
//		}
//		for (int i = 0; i < k; i++) {
//			b[i] = sc.nextInt();
//		}
//		for (int i = 1; i <n; i++) {
//			b[i] = sc.nextInt();
//		}
//		int[][] c = new int[h][w];
//		for (int i = 0; i < h; i++) {
//			for(int j = 0; j < w; j++) {
//				c[i][j] = 0;
//			}
//		}

//		int tmp_a = 0;
//		int tmp_b = 0;
		long tmp =0;
		if(a>b)tmp=b;
		else tmp=a;

		long cnt=0;

		for(long i=1;i<=tmp;i++) {
			if (i == 2 || i == 3) {
			    if(a%i==0&&b%i==0) {
			    	cnt++;
			    }
			} else if (i % 2 == 0 || i % 3 == 0) {

			} else {
				if(a%i==0&&b%i==0) {
			    	cnt++;
			    }
			}
		}

		System.out.println(cnt);

		sc.close();
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:63: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

int main(){
  ll a,b,c,d,e,f,n;
  cin >> a >> b;
  c=max(a,b);
  d=min(a,b);
  n=0;
  while(c%d!=0){
    b=c%d;
    c=d;
    d=b;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'll' was not declared in this scope
    2 |   ll a,b,c,d,e,f,n;
      |   ^~
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:3: error: 'c' was not declared in this scope
    4 |   c=max(a,b);
      |   ^
a.cc:4:5: error: 'max' was not declared in this scope
    4 |   c=max(a,b);
      |     ^~~
a.cc:5:3: error: 'd' was not declared in this scope
    5 |   d=min(a,b);
      |   ^
a.cc:5:5: error: 'min' was not declared in this scope; did you mean 'main'?
    5 |   d=min(a,b);
      |     ^~~
      |     main
a.cc:6:3: error: 'n' was not declared in this scope
    6 |   n=0;
      |   ^
Language: C++

#include<bits/stdc++.h>


using namespace std;
long long int N,M,a;
inline std::vector<bool>::reference
operator|=(std::vector<bool>::reference r,
	std::vector<bool>::const_reference c)
{
	return r = r | c;
}
// エラトステネスの篩
bool is_prime[5000000000+1];
//bitset<N> a;
vector<int> P;
void Eratosthenes(const int N)
{
	for (int i = 0; i < N; i++)
	{
		is_prime[i] = true;//初期化
	}
	for (int i = 2; i < N; i++)
	{
		if (is_prime[i])
		{
			for (int j = 2 * i; j < N; j += i)
			{
				is_prime[j] = false;
			}
			P.emplace_back(i);
		}
	}
}
int main(void) {
	int ans = 1;
	cin >> a >> M;
	N = min(a, M) / 2;
	Eratosthenes(N);
	//cout << "hoge";
	for (const auto& x : P)  if (M% x==0 &&a%x== 0)ans++;
	//cout << x << endl; }
	cout << ans;
	return 0;
}



Compiler output:
/tmp/ccfLLp8w.o: in function `Eratosthenes(int)':
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccfLLp8w.o
/tmp/ccfLLp8w.o: in function `main':
a.cc:(.text+0x11e): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccfLLp8w.o
/tmp/ccfLLp8w.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1e1): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccfLLp8w.o
a.cc:(.text+0x1fa): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccfLLp8w.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>


using namespace std;
long long int N,M,a;
inline std::vector<bool>::reference
operator|=(std::vector<bool>::reference r,
	std::vector<bool>::const_reference c)
{
	return r = r | c;
}
// エラトステネスの篩
bool is_prime[5000000000+1];
//bitset<N> a;
vector<int> P;
void Eratosthenes(const int N)
{
	for (int i = 0; i < N; i++)
	{
		is_prime[i] = true;//初期化
	}
	for (int i = 2; i < N; i++)
	{
		if (is_prime[i])
		{
			for (int j = 2 * i; j < N; j += i)
			{
				is_prime[j] = false;
			}
			P.emplace_back(i);
		}
	}
}
int main(void) {
	int ans = 1;
	cin >> a >> M;
	N = min(a, M) / 2;
	Eratosthenes(N);
	//cout << "hoge";
	for (const auto& x : P)  if (M% x==0 &&a%x== 0)ans++;
	//cout << x << endl; }
	cout << ans;
}



Compiler output:
/tmp/ccaAXNKf.o: in function `Eratosthenes(int)':
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccaAXNKf.o
/tmp/ccaAXNKf.o: in function `main':
a.cc:(.text+0x11e): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccaAXNKf.o
/tmp/ccaAXNKf.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1e1): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccaAXNKf.o
a.cc:(.text+0x1fa): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccaAXNKf.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
const int maxn = sqrt(1e12);
bool prime[maxn];
using namespace std;
vector<int>v;
void con(){
    for(int i=0;i<maxn;i++)
        prime[i] = true;
    prime[0] = false;
    prime[1] = false;

    for(int i=2;i<=sqrt(maxn);i++){
        if(!prime[i])continue;
        for(int j=i*i;j<=maxn;j+=i){
            prime[j] = false;
        }
    }
    v.push_back(1);
    v.push_back(2);
    for(int i = 3;i<maxn;i++){
        //cout<<i<<endl;
        if(prime[i])
            v.push_back(i);
    }
}
int main()
{
    int n,m;
    con();
    cin>>n>>m;
    int num = min(n,m),cnt=0;
    for(int i=0;i<v.size();i++){
        if(v[i]>num)break;
        if(n%v[i]==0&&m%v[i]==0)
            cnt++;
    }
    cout<<cnt<<endl;
    return 0;
}


Compiler output:
a.cc:6:18: error: 'sqrt' was not declared in this scope
    6 | const int maxn = sqrt(1e12);
      |                  ^~~~
a.cc:7:12: error: size of array 'prime' is not an integral constant-expression
    7 | bool prime[maxn];
      |            ^~~~
a.cc: In function 'void con()':
a.cc:16:20: error: 'sqrt' was not declared in this scope
   16 |     for(int i=2;i<=sqrt(maxn);i++){
      |                    ^~~~
Language: Java

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

public class main {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        PrintWriter pw = new PrintWriter(System.out);

        long a = sc.nextLong();
        long b = sc.nextLong();

        long gcd = EuclideanAlgorithm(a, b);
        long cnt = 0;
        List<Long> list = new ArrayList<>();

        // 計算量短縮のため、2はループとは別で判定しておく
        if (a % 2 == 0 && b % 2 == 0)
            cnt++;

        for (long i = 3; i <= gcd; i+=2) {
            boolean isPrime = true;
            for (long j : list) {
                if (i % j == 0) {
                    isPrime = false;
                    break;
                }
            }
            if (isPrime) {
                list.add(i);
                if (a % i == 0 && b % i == 0)
                    cnt++;
            }
        }

        System.out.println(cnt + 1);
    }

    static long EuclideanAlgorithm(long a, long b) {
        long max = Math.max(a, b);
        long min = Math.min(a, b);

        long re = max % min;
        if (re == 0)
            return min;
        return EuclideanAlgorithm(min, re);
    }

    static class MyScanner {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);
        StringTokenizer tokenizer;

        String next() {
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                    tokenizer = new StringTokenizer(reader.readLine());
                }
            } catch (IOException ignored) {
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}

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

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

ll N,M,K,A,B,C,ans=0,cnt=0;
string S,T;
vector<int> P,Q;
vector<pair<int,int>> PP;
bool CAN=false,CAN2=true;



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




int main(){
  cin>>A>>B;
  N=gcd(A,B);
  
  if(N==1){
    cout<<1<<endl;
    return 0;
  }
  
  for(ll i=2; i=<N; ++i){
    CAN=false;
    while(N%i==0){
      N/=i;
      CAN=true;
      CAN2=false;
    }
    if(CAN) ans++;
    if(N==1) break;
  }
  
  
  if(CAN2) cout<<2<<endl; //Nが素数
  cout<<ans+1<<endl;
}

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

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

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


int main(){
  ll a,b,c,count1=0,count2=0;
  cin >> a >> b;
  c=gcd(a,b);
  while(c%2==0){
    c/=2;
    if(!count1)count1=1;
  }
  count2=count1;
  for(ll i=3;i<=sqrt(c);i+=2){
    if(i>3&&i%3==0)continue;
    if(i>5&&i%5==0)continue;
    while(c%i==0){
      c/=i;
      count1++;
    }
    if(count1>count2+1)count1=count2+1;
    count2=count1;
  }
  else if(count1==1&&c==1)cout << 2<<endl;
  else if(c==1)cout<<1<<endl;
  else cout << count1+2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:3: error: 'else' without a previous 'if'
   32 |   else if(count1==1&&c==1)cout << 2<<endl;
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
long long gcd(long long a, long long b) {
	return b == 0 ? a : gcd(b, a % b);
}
bool isprime(int i) {
	if (i == 2)
		return 1;
	for (int j = 2; j < sqrt(i) + 1; j++)
		if (i % j == 0)
			return 0;
	return 1;
}
int main() {
	long long m, n;
	int cnt=1;
	cin >> m >> n;
	long long a;
	a=gcd(m, n);
	if (a == 1) {
		cout << 1;
		return 0;
	}
	for (int i = 2; i < sqrt(a) + 1; i++)
	{
		if (isprime(i)&& a%i==0)
			cnt ++;
	}
	cout << cnt;
	return 0;
}

Compiler output:
a.cc: In function 'bool isprime(int)':
a.cc:9:29: error: 'sqrt' was not declared in this scope
    9 |         for (int j = 2; j < sqrt(i) + 1; j++)
      |                             ^~~~
a.cc: In function 'int main()':
a.cc:24:29: error: 'sqrt' was not declared in this scope
   24 |         for (int i = 2; i < sqrt(a) + 1; i++)
      |                             ^~~~
Language: C++

#include<bits/stdc++.h>

#define pb push_back
#define vi vector < int >
#define ii pair < int, int >
#define vii vector < pair < int, int > >
#define vvi vector < vector < int > >
#define ll long long
#define X first
#define Y second
#define mp make_pair
#define FOR( i, lo, hi ) for( int i = (lo);i < (hi);i++ )
#define DFOR( i, hi, lo ) for( int i = (hi);i >= (lo);i-- )
#define pqueue priority_queue

using namespace std;

const long long int MOD = 1e9 + 7;

ll ADD( ll a, ll b )
{
	return ( ( a % MOD ) + ( b % MOD ) ) % MOD;
}

ll SUB( ll a, ll b )
{
	return ( ( a % MOD ) - ( b % MOD ) + MOD ) % MOD;
}

ll MUL( ll a, ll b )
{
	return ( ( a % MOD ) * ( b % MOD ) ) % MOD;
}

ll POT( ll n, ll k )
{
	if ( k == 0 )
		return 1;

	ll ret = POT( n, k / 2 );
	ret = MUL( ret, ret );

	if ( k % 2 )
		return MUL( ret, n );
	return ret;
}

ll DIV( ll a, ll b )
{
	return MUL( a , POT( b, MOD - 2 ) );
}

bool isPrime( ll x )
{
	for ( ll i = 2;i <= sqrt( x ) + 1; i++ )
		if ( x % i )
			return false;
	return true;
}

ll a, b;

int main()
{
	cin >> a >> b;
	set < ll > cdiv;
	ll c = __gcd( a, b );
	for ( ll i = 1;i <= sqrt( c ) + 1;i++ )
	{
		if ( c % i == 0 )
		{
			cdiv.insert( i );
			cdiv.insert( c / i );
		}
	}
	
	int n = cdiv.size();
	vector < ll > v( cdiv.begin(), cdiv.end() );
	int sol = 0;
	sort( v.begin(), v.end() );
	FOR( i, 0, n )
	{
		ll g = v[ i ];
		FOR( j, i + 1, n )
		{
			g = gcd
		}
	}
	
	cout << sol << "\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:86:29: error: cannot resolve overloaded function 'gcd' based on conversion to type 'long long int'
   86 |                         g = gcd
      |                             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  int c = min(a,b);
  int count = 1
  if (c != 1){
    for (int i=2;i<c+1;i++){
      bool f1 = false;
      bool f2 = false;
      if (a%i == 0){
        f1 = true;
        a = a/i;
        while(a%i == 0){
          a = a/i
        }
      }
      if (b%i == 0){
        f2 = true;
        b = b/i;
        while(b%i == 0){
          b = b/i
        }
      }
      if (f1 && f2){
        count += 1
      }
    }
  }
  cout << count << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if (c != 1){
      |   ^~
Language: C++

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

int main(void){
	int a,b,c,f=0,i;
  	scanf("%d %d",&a,&b);
  	if(b>a){
    b+=a;
      a=b-a;
      b-=a;
    }
  	if(a==b)a+=a;
  	for(;;){
    	c=a-b;
      	if(b%c==0){
        	break;
        }else{
        	b=b%c;
          	a=c;
        }
    }
  	b=1;
	for(a=2;a<=sqrt(c);a++){
      for(i=2;i<\a;i++){
        	if(a%i==0){
            	f=1;
              	break;
            }
      }
  	  if((c%a==0)&&(f==0))b++;
      f=0;
    }
  	printf("%d",b);
}

Compiler output:
a.cc:24:17: error: stray '\' in program
   24 |       for(i=2;i<\a;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;

bool is_prime[100000000000];
vector<ll> pp;
void sieve(ll n){
    ll p = 0;
    for(int i = 0; i <= n; i++)is_prime[i] = true;
    for(int i = 2; i <= n; i++){
        if(is_prime[i]){
            pp.push_back(i);
            for(int j = 2*i; j<=n; j+=i)is_prime[j] = false;
        }
    }
    return;
}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    ll r = a%b;
    while(r!=0){
        a=b;
        b=r;
        r=a%b;
    }
    return b;
}

int main(){
    ll a, b;
    cin >> a >> b;
    ll g = gcd(a, b);
    ll pre = 1;
    ll num = 0;
    ll ans = 0;
    sieve(g);

    while(pp.size() > num){
        if(g%pp[num]==0){
            g/=pp[num];
            if(num != pre)ans++;
            pre = num;
        }
        num++;
    }
    cout << ans+1 << endl;
    return 0;
}

Compiler output:
/tmp/ccOMJo6u.o: in function `sieve(long long)':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
/tmp/ccOMJo6u.o: in function `main':
a.cc:(.text+0x19d): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
a.cc:(.text+0x1cf): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
a.cc:(.text+0x20a): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
/tmp/ccOMJo6u.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x262): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
a.cc:(.text+0x27b): relocation truncated to fit: R_X86_64_PC32 against symbol `pp' defined in .bss section in /tmp/ccOMJo6u.o
collect2: error: ld returned 1 exit status
Language: C++

#include <cstdio>
#include <vector>
#include <cmath>

using namespace std;

bool search(vector<int> l, int n) {
    for (int i = 0; i < l.size(); i++) {
        if (l[i] != 1) {
            if (n % l[i] == 0) {
                return false;
            }
        }
    }
    return true;
}

int main() {
    int a, b;
    scanf("%d%d", &a, &b);
    int max_divisor;
    if (sqrt(a) > sqrt(b)) {
        max_divisor = sqrt(a);
    } else {
        max_divisor = sqrt(b);
    }

    vector<int> common_divisors(1, 1);
    for (int i = 2; i < max_divisor; i++) {
        if (a % i == 0 && b % i == 0) {
            auto result = find(common_divisors.begin(), common_divisors.end(), i);
            if (result == common_divisors.end()) {
                bool is_ok = search(common_divisors, i);
                if (is_ok) {
                    common_divisors.resize(common_divisors.size() + 1);
                    common_divisors[common_divisors.size() - 1] = i;
                }
            }
        }
    }
    printf("%lu", common_divisors.size());
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:27: error: 'find' was not declared in this scope
   31 |             auto result = find(common_divisors.begin(), common_divisors.end(), i);
      |                           ^~~~
Language: C++

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

int main() {
  int A,B;
  cin>>A>>B;
  int C=min(A,B);
  int D=max(A,B);
  int E=sqrt(C);
  vector<int>F(E);
  for(int i=0;i<E;i++){
    F.at(i)=D+1;
  }
  for(int i=1;i<=E;i++){
    int yakusuu=0;
    for(int j=1;j<=i;j++){
      if(i&j==0){
        yakusuu++;
      }
    }
  }
    if(yakusuu==2){
      F.at(i-1)=i;
    }
  }
  int ans=1;
  for(int i=0;i<E;i++){
    if(A%F.at(i)==0&&B%F.at(i)==0){
      ans++;
    }
  }
  cout<<ans<<endl;
    
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: 'yakusuu' was not declared in this scope
   22 |     if(yakusuu==2){
      |        ^~~~~~~
a.cc:23:12: error: 'i' was not declared in this scope
   23 |       F.at(i-1)=i;
      |            ^
a.cc: At global scope:
a.cc:27:3: error: expected unqualified-id before 'for'
   27 |   for(int i=0;i<E;i++){
      |   ^~~
a.cc:27:15: error: 'i' does not name a type
   27 |   for(int i=0;i<E;i++){
      |               ^
a.cc:27:19: error: 'i' does not name a type
   27 |   for(int i=0;i<E;i++){
      |                   ^
a.cc:32:3: error: 'cout' does not name a type
   32 |   cout<<ans<<endl;
      |   ^~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

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

ll gcd(ll n, ll m);

//エラトステネスの篩
bool is_prime[ 1000000000000 + 1 ];
vector<int> P;
void E( const int N )
{
    for( int i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;//初期化
    }    
    for( int i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( int j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
}

int main(void){
    ll A,B;
    cin >> A >> B;
    ll g  = gcd(A,B);
    E(g);
    ll ans = 1;
    rep(i,P.size())if(g % P[i] == 0) ans++;
    cout << ans << endl;
 
}

ll gcd(ll n,ll m){
    ll a,b,r;
    a = n;
    b = m;
    r = n % m;
    while(r > 0){
        a = b;
        b = r;
        r = a%b;
    }
    return b;
}



Compiler output:
/tmp/ccYiudHE.o: in function `E(int)':
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccYiudHE.o
/tmp/ccYiudHE.o: in function `main':
a.cc:(.text+0x10e): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccYiudHE.o
a.cc:(.text+0x145): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccYiudHE.o
/tmp/ccYiudHE.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1ec): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccYiudHE.o
a.cc:(.text+0x205): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccYiudHE.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define rep2(r, aa, bb) for (ll r = (aa)-1; r >= (bb); r--)
#define be(x) (x.begin(), x.end())
#define pb(t) push_back(t)
#define ll long long
#define mp(a, b) make_pair(a, b)
ll checkPrimeNumber(ll n)
{
    bool flag = false;

    for (ll i = 2; i <=sqrt(n); ++i)
    {
        if (n % i == 0)
        {
            flag = true;
            break;
        }
    }
    return flag;
}
int main()
{
    ll a, b;
    cin>>a>>b;
    vector<ll> A;
    rep(i,2,sqrt(min(b,a)+4)
    {
        if(checkPrimeNumber(i))continue;
        if(a%i==0&&b%i==0)A.pb(i);
    }
    cout<<A.size()+1<<endl;
}

Compiler output:
a.cc:34:2: error: unterminated argument list invoking macro "rep"
   34 | }
      |  ^
a.cc: In function 'int main()':
a.cc:28:5: error: 'rep' was not declared in this scope
   28 |     rep(i,2,sqrt(min(b,a)+4)
      |     ^~~
a.cc:28:8: error: expected '}' at end of input
   28 |     rep(i,2,sqrt(min(b,a)+4)
      |        ^
a.cc:24:1: note: to match this '{'
   24 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <iostream>
#include <stdlib.h>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main(void){
    long int A, B;
    cin >> A >> B;
    size_t N = __algo_gcd(A,B);
    long int count = 1;
    vector<bool> isPrime;
    // エラトステネスの篩
    if(N+1 > isPrime.size()){
        isPrime.resize(N+1,true);
    }
    for(size_t i=2;i<=N;++i){
        if(isPrime[i]){
            // N以下のiの倍数は素数ではない
            for(size_t j=2;i*j<=N;++j){
                isPrime[i*j] = false;
            }
            // Nを素数iで割り切れるならばカウント
            if(N%i==0){
                count += 1;
            }
        }
    }
    cout << count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: '__algo_gcd' was not declared in this scope
   11 |     size_t N = __algo_gcd(A,B);
      |                ^~~~~~~~~~
Language: C++

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

ll gcd(ll n, ll m);

//エラトステネスの篩
bool is_prime[ 1000000000000];
vector<int> P;
void E( const int N )
{
    for( int i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;//初期化
    }    
    for( int i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( int j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
}

int main(void){
    ll A,B;
    cin >> A >> B;
    ll g  = gcd(A,B);
    E(g);
    ll ans = 1;
    rep(i,P.size())if(g % P[i] == 0) ans++;
    cout << ans << endl;
 
}

ll gcd(ll n,ll m){
    ll a,b,r;
    a = n;
    b = m;
    r = n % m;
    while(r > 0){
        a = b;
        b = r;
        r = a%b;
    }
    return b;
}



Compiler output:
/tmp/ccLkSXtq.o: in function `E(int)':
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccLkSXtq.o
/tmp/ccLkSXtq.o: in function `main':
a.cc:(.text+0x10e): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccLkSXtq.o
a.cc:(.text+0x145): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccLkSXtq.o
/tmp/ccLkSXtq.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1ec): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccLkSXtq.o
a.cc:(.text+0x205): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccLkSXtq.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  int A,B;
  cin>>A>>B;
  int C=min(A,B);
  int D=max(A,B);
  int E=C**0.5
  vector<int>F(E);
  for(int i=0;i<E;i++){
    F.at(i)=D+1;
  }
  for(int i=1;i<=E;i++){
    int yakusuu=0;
    for(int j=1;j<=i;j++){
      if(i&j==0){
        yakusuu++:
      }
    }
    if(yakusuu==2){
      F.at(i-1)=i
    }
  }
  int ans=1;
  for(int i=0;i<E;i++){
    if(A%F.at(i)==0&&B%F.at(i)==0){
      ans++;
    }
  }
  cout<<ans<<endl;
    
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: invalid type argument of unary '*' (have 'double')
    9 |   int E=C**0.5
      |           ^~~~
a.cc:12:5: error: 'F' was not declared in this scope
   12 |     F.at(i)=D+1;
      |     ^
a.cc:18:18: error: expected ';' before ':' token
   18 |         yakusuu++:
      |                  ^
      |                  ;
a.cc:22:7: error: 'F' was not declared in this scope
   22 |       F.at(i-1)=i
      |       ^
a.cc:27:10: error: 'F' was not declared in this scope
   27 |     if(A%F.at(i)==0&&B%F.at(i)==0){
      |          ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <functional>
#include <stdexcept>
#include <streambuf>
#include <exception>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <typeinfo>
#include <utility>
#include <complex>
#include <numeric>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <cstring>
#include <locale>
#include <memory>
#include <iosfwd>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <list>
#include <map>
#include <ios>
#include <new>
#include <set>
 
#define int long long
#define ll long long 
#define F first
#define S second
#define make make_pair
#define pb push_back
#define sz(x) (ll)(x.size()) 
#define all(x) x.begin (), x.end ()

using namespace std;

typedef long double ld;

const int MOD = (int)1e9 + 7;
const int N = (int)1e5 * 5 + 22;
const ll INF = (ll)1e18;
const double eps = (double)1e-6;

int a, b;
int gcd (int x, int y)  {
    while (x != 0 && y != 0) {
        x %= y;
        if (x == 0) break;
        y %= x; 
    }
    return x + y;
}

int main () {
    #ifdef Maga
        freopen("input.txt", "r", stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> a >> b;
    int c = gcd(a, b), cnt = 0;
    for (int i = 2; i <= sqrt(c); ++i) {
        bool ok = 0;
        while (c % i == 0) {
            if (ok == 0) cnt++;
            c /= i;
            ok = 1;
        }
    }
    cnt++;
    if (c != 1) {
        cnt++;
    }
    cout << cnt;

    return 0;
}

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