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

#include<bits/stdc++.h>
using namespace std;
#define max(a,b) ((a>b)?a:b);
#define min(a,b) ((b>a)?a:b);
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define pu push
#define pp pop_back
#define in insert                                                                      //copy NUL check.cpp
#define forn(low,high,i) for(i=low;i<high;i++)
#define forrev(high,low,i) for(i = high; i>= low;i--)                                 //g++ atc.cpp -o atc.exe
#define zeroes(x) memset(x,0,sizeof(x))                                        //all elements to 0
#define all(x) (x).begin(), (x).end()
typedef long long int ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
const ll mod =1e9+7;
const ll maxn=100000;




long int j=0,sum=0;




void primeFactors(long int n,long int m)  
{  
	long int p=n;;
	long int q=m;
    
    while (n % 2 == 0 && m % 2==0)  
    {  
    	j++;

         
        n = n/2;
        m=m/2;  
    } 
    if(j>0) 

    sum++;
  
    
    j=0;
    for (long int i = 3; i <= (m>n)?n:m); i = i + 2)  
    {  
        
        while (n % i == 0 && m%i==0)  
        {  
        	j++;
              
            n = n/i;  
            m=m/i;
        }  
        if(j>0)
        sum++;
        j=0;
    }  
  
    // This condition is to handle the case when n  
    // is a prime number greater than 2  

    //if(p==n && p!=1 && q==m && q!=1 && m==n)
    	//sum++;
     //if(((m>n)?m:n)%((n>m)?m:n)==0 && m!=n && p!=1 && q!=1 )
     	//sum++;

     if (n > 2 && m==n )  
        sum++; 
    if(m!=n && n>2 && m>2 && ((m>n)?m:n)%((m>n)?n:m)==0)
    	sum++;
 
    cout<< sum+1;
}  






bool sortbysec(const pair<int,int> &a,                         //sorting of elements wrt second
              const pair<int,int> &b) 
{ 
    return (a.second < b.second); 
} 




int main()
{
	long int n,m;
	
	cin>>n>>m;
	primeFactors(n,m);

	
	

	return 0;
}

Compiler output:
a.cc: In function 'void primeFactors(long int, long int)':
a.cc:57:40: error: expected ';' before ')' token
   57 |     for (long int i = 3; i <= (m>n)?n:m); i = i + 2)
      |                                        ^
      |                                        ;
a.cc:57:43: error: 'i' was not declared in this scope
   57 |     for (long int i = 3; i <= (m>n)?n:m); i = i + 2)
      |                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  long long A,B;
  cin>>A>>B;
  
  long long k=1;
  long long j=0;
  while(k>0){
      j=A/B;
      k=A%B;
      A=B;
      B=k;
  }
//cout<<A<<endl;
  int count=1;
  long long E=A;
  if (A>1){
    for(int i=2;i<A-1;i++){
          if(E%i==0){
              while(E%i==0){
                  E=E/i;
              }
              count++;

          }
        if(E<i){
            break;
        }

      }
    if (E > 1){
      count++;
  }
  cout<<count<<endl;
  
}


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

#include <bits/stdc++.h>
using namespace std;
int main (){
  long long A,B;
  cin>>A>>B;
  
  long long k=1;
  long long j=0;
  while(k>0){
      j=A/B;
      k=A%B;
      A=B;
      B=k;
  }
//cout<<A<<endl;
  int count=1;
  long long E=A;
  if (A>1){
    for(int i=2;i<A-1;i++){
          if(E%i==0){
              while(E%i==0){
                  E=E/i;
              }
              count++;

          }
        if(E<i){
            break;
        }

      }
    if (E > 1){
      count++
  }
  cout<<count<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: expected ';' before '}' token
   33 |       count++
      |              ^
      |              ;
   34 |   }
      |   ~           
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <queue>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <numeric>
#define ll long long
#define fr(i,k,N) for(ll i=k; i<N;i++)
#define rep(i,N) for(ll i=0; i<N;i++)
#define ALL(v) v.begin(),v.end()
#define mp make_pair
using namespace std;
template <class X> void pr(X test){cout<<test<<endl;}
template <class X> void prr(X test){for(auto it:test){cout<<it<<endl;}}
template <class X> void prrr(X test){int f=0;for(auto it:test){cout<<(f++!=0?" ":"")<<it;}cout<<endl;}
template<typename X>
istream&operator>>(istream&i,vector<X>&v){for(X&x:v)i>>x;return i;}

class UF { // union find from https://github.com/kartikkukreja/blog-codes (MIT)
    // [usage]
    // auto uf = new UF(n);
    // uf->merge(l, r); // 0 <= l, r <= n-1
    // ...
public:
    int *id; // inner id
    int cnt; // number of all vartices
    int *sz; // sz[i] means size of i's set
    UF(int N)   {
        cnt = N;
        id = new int[N];
        sz = new int[N];
        for(int i=0; i<N; i++) {
            id[i] = i;
            sz[i] = 1;
        }
    }
    ~UF() {
        delete [] id;
        delete [] sz;
    }
    int find(int p) {
        int root = p;
        while (root != id[root]) root = id[root];
        while (p != root) {
            int newp = id[p];
            id[p] = root;
            p = newp;
        }
        return root;
    }
    void merge(int x, int y) {
        int i = find(x);
        int j = find(y);
        if (i == j) return;
        
        if (sz[i] < sz[j]) {
            id[i] = j;
            sz[j] += sz[i];
        } else {
            id[j] = i;
            sz[i] += sz[j];
        }
        cnt--;
    }
    bool connected(int x, int y) {
        return find(x) == find(y);
    }
    int count() {
        return cnt;
    }
};

// return 約数list 1 <= x <= n
auto divv = [](auto n) {
  unordered_set<decltype(n)> v;
  for(auto i = 1; i*i <= n; i++) {
    if(n%i == 0) {
      v.insert(i);
      if(i*i != n) v.insert(n/i);
    }
  }
  return v;
};

auto isprime = [](auto n){
  bool isPrime = true;
  for(decltype(n) i = 2; i <= sqrt(n); ++i) {
      if(n % i == 0) {
          return false;
      }
  }
  return isPrime;
};

int main() {
    ll n,k;
    cin>>n>>k;

    auto divn = std::move(divv(n));
    auto divk = std::move(divv(k));
    ll sum=0;
    for(auto it:divk) if(divn.count(it)) if(isPrime(it)) sum++;
    pr(sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:114:45: error: 'isPrime' was not declared in this scope; did you mean 'isprime'?
  114 |     for(auto it:divk) if(divn.count(it)) if(isPrime(it)) sum++;
      |                                             ^~~~~~~
      |                                             isprime
Language: C++

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

long int gcd(long int x,long int y){
    if(x % y == 0){
        return y;
    }
    return gcd(y,x % y);
}

int main(){
    long int A,B;
    cin >> A >> B;
    
    long int GCD = gcd(a, b);
    long int g = GCD;
    long int ans = 1;
    for(long int i = 2; i * i <= g; ++i) {
        if(GCD % i == 0){
            ans++;
        while(GCD % i == 0) GCD /= i;
        }
    }
    if(GCD != 1) ans++;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'a' was not declared in this scope
   21 |     long int GCD = gcd(a, b);
      |                        ^
a.cc:21:27: error: 'b' was not declared in this scope
   21 |     long int GCD = gcd(a, b);
      |                           ^
Language: C++

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

long int gcd(long int x,long int y){
    if(x % y == 0){
        return y;
    }
    return gcd(y,x % y);
}

int main(){
    long int A,B;
    cin >> A >> B;
    
    long int GCD = __gcd(a, b);
    long int g = GCD;
    long int ans = 1;
    for(long int i = 2; i * i <= g; ++i) {
        if(GCD % i == 0){
            ans++;
        while(GCD % i == 0) GCD /= i;
        }
    }
    if(GCD != 1) ans++;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'a' was not declared in this scope
   21 |     long int GCD = __gcd(a, b);
      |                          ^
a.cc:21:29: error: 'b' was not declared in this scope
   21 |     long int GCD = __gcd(a, b);
      |                             ^
Language: C++

#include <iostream>
#include <vector>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <queue>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <numeric>
#define ll long long
#define fr(i,k,N) for(ll i=k; i<N;i++)
#define rep(i,N) for(ll i=0; i<N;i++)
#define ALL(v) v.begin(),v.end()
#define mp make_pair
using namespace std;
template <class X> void pr(X test){cout<<test<<endl;}
template <class X> void prr(X test){for(auto it:test){cout<<it<<endl;}}
template <class X> void prrr(X test){int f=0;for(auto it:test){cout<<(f++!=0?" ":"")<<it;}cout<<endl;}
template<typename X>
istream&operator>>(istream&i,vector<X>&v){for(X&x:v)i>>x;return i;}

class UF { // union find from https://github.com/kartikkukreja/blog-codes (MIT)
    // [usage]
    // auto uf = new UF(n);
    // uf->merge(l, r); // 0 <= l, r <= n-1
    // ...
public:
    int *id; // inner id
    int cnt; // number of all vartices
    int *sz; // sz[i] means size of i's set
    UF(int N)   {
        cnt = N;
        id = new int[N];
        sz = new int[N];
        for(int i=0; i<N; i++) {
            id[i] = i;
            sz[i] = 1;
        }
    }
    ~UF() {
        delete [] id;
        delete [] sz;
    }
    int find(int p) {
        int root = p;
        while (root != id[root]) root = id[root];
        while (p != root) {
            int newp = id[p];
            id[p] = root;
            p = newp;
        }
        return root;
    }
    void merge(int x, int y) {
        int i = find(x);
        int j = find(y);
        if (i == j) return;
        
        if (sz[i] < sz[j]) {
            id[i] = j;
            sz[j] += sz[i];
        } else {
            id[j] = i;
            sz[i] += sz[j];
        }
        cnt--;
    }
    bool connected(int x, int y) {
        return find(x) == find(y);
    }
    int count() {
        return cnt;
    }
};

// return 約数list 1 <= x <= n
auto divv = [](auto n) {
  unordered_set<decltype(n)> v;
  for(auto i = 1; i*i <= n; i++) {
    if(n%i == 0) {
      v.insert(i);
      if(i*i != n) v.insert(n/i);
    }
  }
  return v;
};

auto isprime = [](auto n){
  bool isPrime = true;
  for(decltype(n) i = 2; i <= sqrt(n); ++i) {
      if(n % i == 0) {
          return false;
      }
  }
  return isPrime;
};

int main() {
    ll n,k;
    cin>>n>>k;

    auto divn = std::move(divv(n));
    auto divk = std::move(divv(k));
    ll sum=0;
    for(auto it:divk) if(divn.count(it)) if(isPrime(it)) sum++;
    pr(sum+1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:114:45: error: 'isPrime' was not declared in this scope; did you mean 'isprime'?
  114 |     for(auto it:divk) if(divn.count(it)) if(isPrime(it)) sum++;
      |                                             ^~~~~~~
      |                                             isprime
Language: C++

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

long int gcd(long int x,long int y){
    if(x % y == 0){
        return y;
    }
    return gcd(y,x % y);
}

int main(){
    long int A,B;
    cin >> A >> B;
    
    long int GCD = _gcd(A,B);
    long int g = GCD;
    long int ans = 1;
    for(long int i = 2; i * i <= g; ++i) {
        if(GCD % i == 0){
            ans++;
        while(GCD % i == 0) GCD /= i;
        }
    }
    if(GCD != 1) ans++;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: '_gcd' was not declared in this scope; did you mean 'gcd'?
   21 |     long int GCD = _gcd(A,B);
      |                    ^~~~
      |                    gcd
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <numeric>
#include <math.h>
using namespace std;
#define ll long long 

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

int main() {
  long long  a,b;
  cin >> a >> b;
  long long ans = 1;
  ll g = gcd(a,b);
  for(int i=2;i <= g;i++){
      if(g%i == 0){
        ans++;
        while(g%i == 0){
          g /= i;
        }
      }
    }
  }
  
  cout << ans << endl;
  
  
  return 0;
}


Compiler output:
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:32:3: error: expected unqualified-id before 'return'
   32 |   return 0;
      |   ^~~~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

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

int main() {
  ll a,b,r,i;
  int ans=1;
  bool flag;
  
  scanf("%lld%lld",&a,&b);
  while(a%b!=0){
   r = a%b;
    a = b;
    b = r;
  }
  
  for(i=2;i*i<=b;i++){
    flag = false;
    while(b%i==0){
      flag = true;
      b /= i;
    }
    if(flag){
      ans++;
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
a.cc:3:9: error: 'll' does not name a type
    3 | typedef ll long long
      |         ^~
Language: C++

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

int main() {
  ll a,b,r,i;
  int ans=1;
  bool flag;
  
  scanf("%lld%lld",&a,&b);
  while(a%b!=0){
   r = a%b;
    a = b;
    b = r;
  }
  
  for(i=2;i*i<=b;i++){
    flag = false;
    while(b%i==0){
      flag = true;
      b /= i;
    }
    if(flag){
      ans++;
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll a,b,r,i;
      |   ^~
a.cc:9:21: error: 'a' was not declared in this scope
    9 |   scanf("%lld%lld",&a,&b);
      |                     ^
a.cc:9:24: error: 'b' was not declared in this scope
    9 |   scanf("%lld%lld",&a,&b);
      |                        ^
a.cc:11:4: error: 'r' was not declared in this scope
   11 |    r = a%b;
      |    ^
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   for(i=2;i*i<=b;i++){
      |       ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
int gcd(long long a, long long b){
    while (1) {
        if (a < b)
            swap(a, b);
    if(a % b == 0)
    return b;
    else 
    return (gcd(b, a % b));
}
 map< long long, int > prime_factor(long long n) {
     map< long long, int > ret;
         for(long long i = 2; i * i <= n; i++) {
            while(n % i == 0) {
          ret[i]++;
         n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}

int main(){
    long long A, B;
    cin >> A >> B;
    long long sks = gcd(A, B);
    long long memo = sks;
    cout << prime_factor(sks).size() + 1 << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int gcd(long long int, long long int)':
a.cc:12:50: error: a function-definition is not allowed here before '{' token
   12 |  map< long long, int > prime_factor(long long n) {
      |                                                  ^
a.cc:24:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   24 | int main(){
      |         ^~
a.cc:24:9: note: remove parentheses to default-initialize a variable
   24 | int main(){
      |         ^~
      |         --
a.cc:24:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:24:11: error: a function-definition is not allowed here before '{' token
   24 | int main(){
      |           ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:3:34: note: to match this '{'
    3 | int gcd(long long a, long long b){
      |                                  ^
Language: C++

    #include <bits/stdc++.h>
    #define ll  long long int
    #define pb push_back
    #define mp make_pair
    #define ff first
    #define ss second
    #define vi vector<int>
    #define br cout <<"\n";
    #define all(x)  (x).begin(),(x).end()
    #define tr(c,i) for(auto i : c)
    #define pii pair< int,int >
    #define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
    #define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
    #define er(x) cout << x << " "
    #define err(x,y) cout << x << " "<<y
    const int M = 200005;
    using namespace std;
    clock_t time_p=clock();
    void dem()
    {
        time_p=clock()-time_p;
        cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
    }
    using namespace std ;
    const int N =  100 ;
    const int dx[] = { 1, -1 , 0 , 0  };
    const int dy [] = { 0 ,0 , 1 , -1  };
    const int MOD = 1000 * 1000 * 1000 + 9 ;
int64 gcd (  int64 a , int64 b ) // a > b
{
return     b ==  0   ?  a  : gcd ( b , a % b   ) ;
}
int main (){
   int64  a , b ;
   cin >> a >> b ;
    int64   g = gcd ( a, b ) ;
  int res = 1 ; 
if ( g % 2 == 0 ) res++ ; 
  while ( g % 2 == 0 ){
    g /=2 ; 
}
for (  int64 i = 3 ; i * i <= g ; i += 2 ){
	if ( g % i == 0 ){ 
    while (  g % i == 0 )
        g /=i ;
      res ++ ;
    }

}

if ( g > 1 )res ++ ; 
cout <<  res ;

    return 0 ;
    }


Compiler output:
a.cc:29:1: error: 'int64' does not name a type; did you mean 'int64_t'?
   29 | int64 gcd (  int64 a , int64 b ) // a > b
      | ^~~~~
      | int64_t
a.cc: In function 'int main()':
a.cc:34:4: error: 'int64' was not declared in this scope
   34 |    int64  a , b ;
      |    ^~~~~
a.cc:35:11: error: 'a' was not declared in this scope
   35 |    cin >> a >> b ;
      |           ^
a.cc:35:16: error: 'b' was not declared in this scope
   35 |    cin >> a >> b ;
      |                ^
a.cc:36:10: error: expected ';' before 'g'
   36 |     int64   g = gcd ( a, b ) ;
      |          ^  ~
      |          ;
a.cc:38:6: error: 'g' was not declared in this scope
   38 | if ( g % 2 == 0 ) res++ ;
      |      ^
a.cc:39:11: error: 'g' was not declared in this scope
   39 |   while ( g % 2 == 0 ){
      |           ^
a.cc:42:13: error: expected ';' before 'i'
   42 | for (  int64 i = 3 ; i * i <= g ; i += 2 ){
      |             ^~
      |             ;
a.cc:42:22: error: 'i' was not declared in this scope
   42 | for (  int64 i = 3 ; i * i <= g ; i += 2 ){
      |                      ^
a.cc:42:31: error: 'g' was not declared in this scope
   42 | for (  int64 i = 3 ; i * i <= g ; i += 2 ){
      |                               ^
a.cc:51:6: error: 'g' was not declared in this scope
   51 | if ( g > 1 )res ++ ;
      |      ^
Language: C++

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;

long long euclidean_gcd(long long a, long long b) {
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }
  return a;
}


long long insuu(long long n)
{
	if (n == 1)
  {
    return 1;
  }
	long long ans = 1;
  for (long long i = 2; i <= n; ++i)
  {
    if (n % i == 0)
    {
      int cnt = 0;
      while (n % i == 0)
      {
        n /= i;
        cnt++;
        if (cnt > 10 **5)
        {
          break;
        }
      }
      ans++;
    }
    else
    {
      continue;
    }
    
    if (n == 1LL)
    {
      break;
    }
  }
  return ans;
}

int main()
{
  long long A,B;
  cin >> A >> B;
  long long common =  euclidean_gcd(A, B);

  cout << insuu(common) << endl;

}



Compiler output:
a.cc: In function 'long long int insuu(long long int)':
a.cc:31:23: error: invalid type argument of unary '*' (have 'int')
   31 |         if (cnt > 10 **5)
      |                       ^~
Language: C++

#include <math.h>
using namespace std;
#define ll long long 

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

bool prime(int a){
  bool y=true;
  for(int i=2;i<=sqrt(a);i++){
    if(a%i == 0){
      y = false;
      break;
    }
  }
  return y;
}

int main() {
  long long  a,b;
  cin >> a >> b;
  long long ans = 1;
  ll g = gcd(a,b);
  for(int i=2;i<=g;i++){
    if(prime(i)){
      if(g%i == 0){
        ans++;
        g = g/i;
      }
    }
  }
  
  cout << ans << endl;
  
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'cin' was not declared in this scope
   24 |   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 | using namespace std;
a.cc:36:3: error: 'cout' was not declared in this scope
   36 |   cout << ans << endl;
      |   ^~~~
a.cc:36:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:18: error: 'endl' was not declared in this scope
   36 |   cout << ans << 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 | using namespace std;
Language: C++

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

int main()
{
    long long A, B;
    cin >> A >> B;
    long long result = 1;
    long long smaller = min(A, B);
    for (long long i = 2; i <= sqrt(smaller); i++)
    {
        if (A % i == 0 && B % i == 0)
        {
            result++;
            while (A % i == 0 && B % i == 0)
            {
                A /= i;
                B /= i;
            }
        }
    }
    if (result == 1 && max(A, B) % min(A, B) == 0 && max(A, B) !@= 1)
    {
        result++;
    }

    cout << result << endl;
}


Compiler output:
a.cc:23:65: error: stray '@' in program
   23 |     if (result == 1 && max(A, B) % min(A, B) == 0 && max(A, B) !@= 1)
      |                                                                 ^
a.cc: In function 'int main()':
a.cc:23:63: error: expected ')' before '!' token
   23 |     if (result == 1 && max(A, B) % min(A, B) == 0 && max(A, B) !@= 1)
      |        ~                                                      ^~
      |                                                               )
Language: C++

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

int main()
{
  cin.tie(nullptr); ios::sync_with_stdio(false);
  int a,b;
  cin >> a >> b;
  int gcd = __gcd(a,b);
  int ans=1;
  map<int,int> mp;
  for(int i=2; i*i<=gcd; i++){
    while(gcd%i==0) mp[i]++, gcd/=i;
    
    /*
    if(gcd%i==0){
      ans++;
      while(gcd%i==0) gcd /= i;
    }
    */
  }
  ans = gcd == 1 ? ans : ans + 1;
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'map' was not declared in this scope
   13 |   map<int,int> mp;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include<algorithm>
  +++ |+#include <map>
    4 | using namespace std;
a.cc:13:7: error: expected primary-expression before 'int'
   13 |   map<int,int> mp;
      |       ^~~
a.cc:15:21: error: 'mp' was not declared in this scope
   15 |     while(gcd%i==0) mp[i]++, gcd/=i;
      |                     ^~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
using ll = long long;

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

int main(){
    ll a, b;
    cin >> a >> b;
    ll c = gcb(a, b);
    ll ans = 1;
    ll t = 2;
    while(true){
        int count = 0;
        while(true){
            if(c % t == 0){
                c /= t;
                count++;
            } else {
                if(count != 0){
                    ans++;
                }
                break;
            }
        }
        if(c == 1){
            break;
        }
        t++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: 'gcb' was not declared in this scope; did you mean 'gcd'?
   24 |     ll c = gcb(a, b);
      |            ^~~
      |            gcd
Language: C++

// #include <bits/stdc++.h>
#include<iostream>
#include<stack>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<iomanip>
#include<set>
#include<bitset>
#include<cmath>
#include<numeric>
#include<limits>
#include<functional>
#include <bitset>

#define REP(i, m, n) for(int i = (m); i < (n); i++)
#define rep(i,n) REP(i,0,n)
#define NIL -1
using namespace std;
typedef long long ll;
typedef long long int lli;
static const int MOD = 10000007;
static const int MAX = 100005;
// static const int NMAX = 5005;
static const lli INFTY = 1000000000000;

// typedef priority_queue<int, greater<int>> RevQ;
int N, K;
lli A, B;
bool isprime[INFTY];
vector<lli> prime;
// vector<pair<int, int>> a(MAX);

lli gcd(lli a, lli b) {
  return b ? gcd(b, a%b) : a;
}
//
void eratho(lli n) {
  for (lli i = 0; i <= n; i++) {
    isprime[i] = true;
  }
  isprime[0] = isprime[1] = false;
  for (lli i = 2; i <= sqrt(n); i++) {
    if (isprime[i]) {
      lli j = i + i;
      while (j <= n) {
        isprime[j] = false;
        j += i;
      }
      // cout << "DETA" << endl;
    }
  }
}

void enterp(lli n) {
  eratho(n);
  for(lli i = 2; i <= n; i++){
    if (isprime[i]) {
      prime.push_back(i);
    }
  }
}


int main(){
  cin >> A >> B;
  // int cnt = 0;
  lli d;
  // cout << "HEY!" << endl;
  if (A < B) swap(A,B);
  d = gcd(A, B);
  lli D = d;
  int cnt = 1;
  enterp(d);
  for (const auto &i : prime) {
    int flag = 0;
    while(d % i == 0) {
      flag = 1;
      d /= i;
    }
    if (flag) cnt++;
  }
  cout << cnt << endl;
}


Compiler output:
/tmp/ccgoiq4y.o: in function `enterp(long long)':
a.cc:(.text+0x14a): relocation truncated to fit: R_X86_64_PC32 against symbol `prime' defined in .bss section in /tmp/ccgoiq4y.o
/tmp/ccgoiq4y.o: in function `main':
a.cc:(.text+0x20d): relocation truncated to fit: R_X86_64_PC32 against symbol `prime' defined in .bss section in /tmp/ccgoiq4y.o
/tmp/ccgoiq4y.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2e7): relocation truncated to fit: R_X86_64_PC32 against symbol `prime' defined in .bss section in /tmp/ccgoiq4y.o
a.cc:(.text+0x300): relocation truncated to fit: R_X86_64_PC32 against symbol `prime' defined in .bss section in /tmp/ccgoiq4y.o
collect2: error: ld returned 1 exit status
Language: C++

//#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int main(){
    ll A,B;
    cin >> A >> B;
    ll N =  __gcd(A,B);
    ll ans=0;
    for(int i=2;i<=(ll)sqrtl(N);i++){
        if(N%i==0){
            while(N%i==0)N/=i;
            ans++;
        }
    }
    if(g>1)ans++;
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:8: error: 'g' was not declared in this scope
   53 |     if(g>1)ans++;
      |        ^
Language: C++

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

int main(){
    ll a, b; cin >> a >> b;
    ll n = __gcd(a,b);
      
    ll ans = 1;
    if(n % 2 == 0){
        ans++;
        while(n % 2 == 0) n /= 2;
    }
  
    for (int i = 3; i*i <= n; i+=2) {
        if(n % i == 0){
            ans++;
            while (n%i == 0) n /= i;
      	if(n == 1) break;
	}
  	if(n != 1) ans++;

    cout << ans << endl;
}


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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
using namespace std;

void swap_for_gcd(long *A, long *B);
long gcd(long a, long b);

int main(void) {
    long A, B;
    cin >> A >> B;
    long amari;
    
    if(A < B) {
        B = gcd(B, A);
    } else {
        B = gcd(A, B);
    }
    vector<long>devisor;
    for(long i = 1; i < (long) floor(sqrt(B)); i++) {
        if(B % i == 0) {
            devisor.push_back(i);
            if(i != B / i) devisor.push_back(B/i);
        }
    }
    int ans = 1;
    for(int i = 0; i < devisor.size(); i++) {
        if(is_prime(devisor[i])) ans++; 
    }
    cout << ans << endl;
    return 0;
}

long gcd(long a, long b) {
    if(b > a) {
        long tmp = a;
        a = b;
        b = tmp;
    }
    long amari;
    while(1) {
        amari = a%b;
        if(amari == 0) {
            break;
        }
        a = b;
        b = amari;
    }
    return b;
}

int is_prime(long a) {
    if(a == 1) return 0;
    for(long i = 2; i < (long) floor(sqrt(a)); i++) {
        if(a % i == 0) return 0; 
    }
    return 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:12: error: 'is_prime' was not declared in this scope
   32 |         if(is_prime(devisor[i])) ans++;
      |            ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {
	return b ? gcd(b, a % b) : a;
}
int main() {
	ll a, b;
	cin >> a >> b;
	ll g = gcd(a, b);
	int cnt = 1;
	for (ll i = 2; i * i <= g; i++) {
		if (g % i == 0) {
			ans++; 
			while (g % i == 0) g /= i;
		}
	}
	if (g > 1) ans++;
	cout << cnt << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                         ans++;
      |                         ^~~
      |                         abs
a.cc:18:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         if (g > 1) ans++;
      |                    ^~~
      |                    abs
Language: Java

import java.util.*;

public class D{

    public static void main(String args[]){

        Scanner sc = new Scanner(System.in);

		long f = sc.nextLong();
		long s = sc.nextLong();
        long a = Math.min(f, s);
        long b = Math.max(f, s);
        long a_ = a;
        long b_ = b;
        Set<Long> set_a = new HashSet<Long>();
        Set<Long> set_b = new HashSet<Long>();
        set_a.add(1L);
        set_b.add(1L);

        for(long i = 2; i <= a; i++){
            if(i * i > a_) break;
            if(a % i == 0) set_a.add(i);
            else continue;
            while(a % i == 0){
                a /= i;
            }
            if(a == 1) break;
        }
        for(long i = 2; i <= b; i++){
            if(i * i > b_) break;
            if(b % i == 0) set_b.add(i);
            else continue;
            while(b % i == 0){
                b /= i;
            }
            if(b == 1) break;
        }

        long count = 0;
        if(set_a.size() < set_b.size()){
            for(long x: set_a){
                if(set_b.contains(x)) count++;
            }
        }else{
            for(long x: set_b){
                if(set_a.contains(x)) count++;
            }
        }
        // for(long x: set_a){
        //     if(b % x == 0) count++;
        // }

        System.out.println(count);

    }

}


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

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
const int MOD = (int)1e9 + 7;
const int INF = 1LL << 60;
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; }
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i,s,n) for (int i = s; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end() //コンテナじゃないと使えない!!
#define debug(x) cerr << #x << ": " << x << "\n";
template <typename T>
ostream& operator<<(ostream& os, vector<T> &V){
    int N = V.size();
    REP(i,N){
        os << V[i];
        if (i!=N-1) os << " ";
    }
    os << "\n";
    return os;
}
int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int solve(int n){
    int copy = n;
    int prime=0;
    for(int i=2;i*i<=copy;i++){
        bool pri = false;
        while(n%i==0){
            n/=i;
            pri=true;
        }
        if(pri){
            prime++;
        }
    }
    if(n!=1) prime++;
    return prime+1; //素因数の数 + 1
}
//fixed<<setprecision(10)<<ans<<endl;
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int A,B,G;
    cin >> A>>B;
    G=gcd(A,B);
    
    int ans=solve(G);



    cout << ans << endl;
}c

Compiler output:
a.cc:56:2: error: 'c' does not name a type
   56 | }c
      |  ^
Language: Java

import java.util.*;

public class Main{

    public static void main(String args[]){

        Scanner sc = new Scanner(System.in);

		long f = sc.nextLong();
		long s = sc.nextLong();
        long a = Math.min(f, s);
        long b = Math.max(f, s);
        long a_ = a;
        Set<Long> set_a = new HashSet<Long>();
        Set<Long> set_b = new HashSet<Long>();
        set_a.add(1L);

        for(long i = 2; i <= a; i++){
            if(i * i > a_) break;
            if(a % i == 0) set_a.add(i);
            else continue;
            while(a % i == 0){
                a /= i;
            }
            if(a == 1) break;
        }
        for(long i = 2; i <= b; i++){
            if(i * i > b_) break;
            if(b % i == 0) set_b.add(i);
            else continue;
            while(b % i == 0){
                b /= i;
            }
            if(b == 1) break;
        }

        long count = 0;
        if(set_a.size() < set_b.size()){
            for(long x: set_a){
                if(set_b.contains(x)) count++;
            }
        }else{
            for(long x: set_b){
                if(set_a.contains(x)) count++;
            }
        }
        // for(long x: set_a){
        //     if(b % x == 0) count++;
        // }

        System.out.println(count);

    }

}


Compiler output:
Main.java:28: error: cannot find symbol
            if(i * i > b_) break;
                       ^
  symbol:   variable b_
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
inline int in() { int x; scanf("%d",&x); return x;}
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("YES");}else{puts("NO");}
const int MX = 200005;
 
int main() {
  ll a,b;
  ll count=1;
  cin>>a>>b;
  ll minn=min(a,b);
  /*


  if(a%2==0&&b%2==0){
    count++;
  }
  for(int i=3;i<=minn;i++){
    if(a%i==0&&b%i==0){
      if(i%2==0)continue;

      for(int j=3;j<=i;j+=2){
        if(i!=j&&i%j==0)break;
        count++;
      }
    }
  }
  */
 for(int i=1;i<=minn;i++){
   if(a%)
 }

  cout<<count;
}
 
    
 

Compiler output:
a.cc: In function 'int main()':
a.cc:81:9: error: expected primary-expression before ')' token
   81 |    if(a%)
      |         ^
a.cc:82:2: error: expected primary-expression before '}' token
   82 |  }
      |  ^
Language: C++

#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

bool isPrime(ll num) {
  if (num == 2 || num == 1)
    return true;
  else if (num % 2 == 0)
    return false;  // 偶数はあらかじめ除く

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

  // 素数である
  return true;
}

ll calcNumOfCombination(ll n, ll r) {
  ll num = 1;
  for (ll i = 1; i <= r; i++) {
    num = num * (n - i + 1) / i;
  }
  return num;
}

int main() {
  ll a, b;
  cin >> a >> b;
  ll gcdNum = gcd(a, b);
  ll count = 0;
  for (ll i = 1; i <= gcdNum; ++i) {
    if (gcdNum % i == 0) {
      if (isPrime(i)) {
        count++;
      }
    }
  }
  cout << count << rndl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:20: error: 'rndl' was not declared in this scope
   52 |   cout << count << rndl;
      |                    ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<utility>
#include<string>
#include<utility>
#include<iomanip>
#include<bitset>
#include<math.h>
using namespace std;

long long gcd(long long a,long long b){
	if(a == 0 || b == 0){
		return a^b;
	}
    if(a < b){
        swap(a,b);
    }
    long long r = a % b;
    while(r != 0){
        a = b;
        b = r;
		r = a % b;
    }
    return b;
}

vector<long long> divisor(long long n) {
  vector<long long> ret;
  for(long long i = 1; i * i <= n; i++) {
    if(n % i == 0) {
      ret.push_back(i);
      if(i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}

class UnionFind
{
	public:
    vector<long long> parent;

    UnionFind(long long n){
        parent = vector<long long>(n, -1);
    }

    long long root(long long n){
        if(parent[n] < 0){
            return n;
        }else{
            return parent[n] = root(parent[n]);
        }
    }

    long long size(long long n){
        return -parent[root(n)];
    }

    bool connect(long long a,long long b){
        a = root(a);
        b = root(b);
        if(a == b){
            return false;
        }
        if(size(a) < size(b)) swap(a,b);
        parent[a] += parent[b];
        parent[b] = a;
        return true;
    }

};


long long main(){

	long long a,b;
	cin >> a >> b;
	vector<long long> v;
	
	long long n = gcd(a,b);
	v = divisor(n);
	
	UnionFind uf(v.size());
	
	for (long long i = 1; i < v.size(); i++)
	{
		for (long long j = i+1; j < uf.parent.size(); j++)
		{
			if(uf.parent[j] < 0){
				if(v[j] % v[i] == 0){
					uf.connect(i,j);
					//break;
				}
			}
		}
	}
	
	/*for (long long i = 0; i < uf.parent.size(); i++)
	{
		cout << uf.parent[i] <<endl;
	}*/
	long long ans = 0;
	for (long long i = 0; i < uf.parent.size(); i++)
	{
		if(uf.parent[i] < 0 ){
			ans ++;
		}
	}
	cout << ans << endl;
	
}


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

    #include <bits/stdc++.h>
    #define ll  long long int
    #define pb push_back
    #define mp make_pair
    #define ff first
    #define ss second
    #define vi vector<int>
    #define br cout <<"\n";
    #define all(x)  (x).begin(),(x).end()
    #define tr(c,i) for(auto i : c)
    #define pii pair< int,int >
    #define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
    #define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
    #define er(x) cout << x << " "
    #define err(x,y) cout << x << " "<<y
    const int M = 200005;
    using namespace std;
    clock_t time_p=clock();
    void dem()
    {
        time_p=clock()-time_p;
        cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
    }
    using namespace std ;
    const int N =  100 ;
    const int dx[] = { 1, -1 , 0 , 0  };
    const int dy [] = { 0 ,0 , 1 , -1  };
    const int MOD = 1000 * 1000 * 1000 + 9 ;
int gcd (  ll a , ll b ) // a > b
{
return     b ==  0   ?  a  : gcd ( b , a % b   ) ;
}
int main (){
   ll  a , b ;
   cin >> a >> b ;
    ll   g = gcd ( a, b ) ;
  int res = 1 ; 
if ( g % 2 == 0 ) res++ ; 
  while ( g % 2 == 0 ){
    g /=2 ; 
}
for (  ll i = 3 ; i * i <= g ; i += 2 ){
	if ( g % i == 0 ){ 
    while (  g % i == 0 ){
        m[i] ++ ;
        g /=i ;
    }
      res ++ ;
    }

}

if ( g > 1 )res ++ ; 
cout <<  res ;

    return 0 ;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'm' was not declared in this scope
   45 |         m[i] ++ ;
      |         ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>



int main()
{
	int A, B;
	scanf("%d %d", &A, &B);

	

	int x, min, Ans = 0;
	if (A >= B) min = B;
	else min = A;

	for (x = min; x > 0; x--) {

		int  t, m = 0;

		if (x >= 4) {
			for (t = 2; t < x; t++) {
				if (x % t == 0) m++;
				break;
			}
		}

		if (A % x == 0 && B % x == 0 && m=0) Ans++;
	}


	printf("%d", Ans);
	
}






Compiler output:
main.c: In function 'main':
main.c:31:50: error: lvalue required as left operand of assignment
   31 |                 if (A % x == 0 && B % x == 0 && m=0) Ans++;
      |                                                  ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define ANS cout << ans << endl
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define REVERSE(a) reverse(all(a))
#define int long long
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define VIin(a) for(int i=0; i<a.size(); i++) cin >> a[i]
#define OUT(a) cout << a << endl
typedef vector<int> VI;
typedef vector<VI> VVI;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
/*最大公約数*/int gcd(int x, int y) { return y ? gcd(y,x%y) : x;}
/*最小公倍数*/int lcm(int a, int b) { int g = gcd(a, b); return a / g * b; }
/*素数判定*/int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------------------------------------
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int a,b; cin >> a >> b;
    int ans = 0;
    int g = gcd(a,b);
    VI y = getDivisor(g);
    int x = y.size();
    rep(i,x){
        if(isPrime(y[i]) == 1) ans++;
    }
    cout << ans + 1 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<long long int> getDivisor(long long int)':
a.cc:24:141: error: 'sort' was not declared in this scope; did you mean 'short'?
   24 | /*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
      |                                                                                                                                             ^~~~
      |                                                                                                                                             short
Language: C

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

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 (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

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

int main()
{
    ll i;
    ll A,B;
    cin >> A >> B;

    ll primecnt=0;
    ll max=B;

    if(A>B) max=A;
    max = gcd(A,B);
    if(max == 1)
    {
        cout << 1 << endl;
        return 0;
    }

    for(i=2; i<=sqrt(max);i++)
    {
        if(A%i==0 && B%i==0)
        {
            if(IsPrime(i))
            {
                primecnt++;
            }
            
        }
        
        
    }

    
    
    cout << primecnt + 1 << endl;

    return 0;
}

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

#include "bits/stdc++.h"
#define ll long long
#define ALL(x) x.begin(),x.end()
#define MOD (1000000000+7)
using namespace std;

const int N = pow(10,5);
 
vector<bool> isp(N, true);
 
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i=2; pow(i,2)<=N; i++) {
    if (isp[i]) for(int j=2; i*j<=N; j++) isp[i*j] = false;
  }
}
 

int main(){
ll A,B;

cin>>A>>B;
vector<ll> so;
ll tar = __gcd(A,B);
ll ans=1;
ll NN=tar;
sieve();


for (ll i = 2; i<=NN; i++) {
    if(isp[i]==0)
    continue();
		
    if(tar%i==0){
      ans++;
    }
    
    while (tar%i == 0) { // 素数で割り切れなくなるまで割っていく　//割った個数を配列に足す
			tar /= i;
		}

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


cout<<ans<<endl;






}




Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: expected ';' before '(' token
   33 |     continue();
      |             ^
      |             ;
a.cc:33:14: error: expected primary-expression before ')' token
   33 |     continue();
      |              ^