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

#include <cstdio>
#include <cmath>
#define rep(i,n,m) for(int i = (n); i<(m); i++)

int main(void){
  int n, k;
  if (!scanf("%d%d", &n, &k))
    return 0;
  if (n>k){
    int tmp = k;
    k = n;
    n = tmp;
  }
  if (n < 3){
    printf("%d\n", n);
    return 0;
  }
  int N = std::sqrt(k);
  int* array = new int[N]();
  rep(i,0,N)
    array[i] = -1;
  array[0] = 1;
  int count = 1;
  if (n%2 == 0 && k%2 == 0){
    array[1] = 2;
    count++;
  }
  int ans = 2;
  int yaku[3];
  for ( int i = 3; i <= N; i+=2){
    if (n%i == 0 && k%i == 0){
      int k = 1;
      yaku[0] = i;
      if (k%(n/i) == 0){
        yaku[1] = n/i;
        k++;
      }
      if (n%(k/i) == 0){
        yaku[2] = n/k;
        k++
      }
      rep(d,0,3){
        bool can = true;
        for (int j = 1;array[j] != -1; j++){
          if (yaku[d]%array[j] == 0){
            can = false;
            break;
          }
        }
        if (can){
          array[count] = yaku[d];
          count++;
        }
      }
    }
  }
  for(ans = 0; array[ans] != -1; ans++);
  printf("\n%d\n", ans);
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:12: error: expected ';' before '}' token
   40 |         k++
      |            ^
      |            ;
   41 |       }
      |       ~
Language: Java

import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)

upper = int(math.sqrt(minAB+1))
ans = 1
for i in range(2, upper+1):
    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False
    
    if A % i == 0  and B % i == 0:
        ans += 1
        
print(ans)

Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:2: error: ';' expected
A, B = map(int, input().strip().split())
 ^
Main.java:6: error: class, interface, enum, or record expected
hurui = [True] * (minAB+1)
^
3 errors
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <math.h>
using namespace std;
typedef unsigned long long ll;
// A > B
ll calcGCD(ll A, ll B){
  if(A % B == 0){
    return B;
  } else {
    calcGCD(B, A%B);
  }
}

bool isPrime(ll gcd){
  
}

ll main(){
  ll A,B;
  cin >> A >> B;
  ll bigger = A;
  ll smaller = B;
  if(A < B){
    bigger = B;
    smaller = A;
  }
  ll gcd = calcGCD(bigger,smaller);
  // gcdを素因数分解
  ll counter = 1;
  ll root = (ll) sqrt(gcd);
  ll gcd_copy = gcd;
  for(ll i = 2; i < gcd_copy; i++){
    bool isDevide = false;
    while(gcd % i == 0){
      if(!isDevide){
	counter++;
	isDevide = true;
      }
      gcd = gcd / i;
    }
    if(i > gcd){
      cout << counter << endl;
      return 0;
    }
    if(i > root && counter == 1){
      cout << 2 << endl;
      return 0;
    }
  }
  cout << counter << endl;
  return 0;
}


Compiler output:
a.cc: In function 'bool isPrime(ll)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
a.cc: At global scope:
a.cc:23:1: error: '::main' must return 'int'
   23 | ll main(){
      | ^~
a.cc: In function 'll calcGCD(ll, ll)':
a.cc:15:12: warning: control reaches end of non-void function [-Wreturn-type]
   15 |     calcGCD(B, A%B);
      |     ~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>
int main(){
  int A,B;
  scanf("%d %d",&A,&B);
  int a1,a2,b1,b2;
  a1=0;
  b1=0;
  for(i=1;i<=A;++i){
if(A%i=0){
a2=a1+1;
  a1=a2;
  C[a1]=A;
}
 for(i=1;i<=B;++i){
if(B%i=0){
b2=b1+1;
  b1=b2;
  D[b1]=B;
}
a1a1a1a1a1a1a1a1
  for(

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=1;i<=A;++i){
      |       ^
a.cc:12:3: error: 'C' was not declared in this scope
   12 |   C[a1]=A;
      |   ^
a.cc:18:3: error: 'D' was not declared in this scope
   18 |   D[b1]=B;
      |   ^
a.cc:20:1: error: 'a1a1a1a1a1a1a1a1' was not declared in this scope
   20 | a1a1a1a1a1a1a1a1
      | ^~~~~~~~~~~~~~~~
a.cc:21:7: error: expected '}' at end of input
   21 |   for(
      |       ^
a.cc:14:19: note: to match this '{'
   14 |  for(i=1;i<=B;++i){
      |                   ^
a.cc:21:7: error: expected '}' at end of input
   21 |   for(
      |       ^
a.cc:8:20: note: to match this '{'
    8 |   for(i=1;i<=A;++i){
      |                    ^
a.cc:21:7: error: expected '}' at end of input
   21 |   for(
      |       ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#define MOD 1000000007
typedef long long ll;

using namespace std;

ll euc(ll a, ll b) {
    ll temp;
    
    if( a < b ) { temp = a; a = b; b = temp; }
    if( b < 1 ) return -1;
    
    if( a % b == 0 ) return b;
    return euc( b, a % b );
}

bool abc(ll a) {
    if(a <= 2) return true;
    if(a % 2 == 0) return false;

    for(ll j = 3; j <= sqrt(a); j+=2)
    {
        if(a % j == 0)
        {
            return false;
        }
    }
    
    return true;
}

int main() {
    ll a, b;
    cin >> a >> b;
    
    ll max = euc(a, b);
    
    vector<ll> list;
    for(ll i = 1; i <= max; i++) {
        if(max % i == 0) {
            list.push_back(i);
        }
    }
    
    int ans = 0;
    for(ll i = 0; i < list.size(); i++) {
        if(abc(list[i])) {
            ans++;
            // cout << list[i] << endl;
        }
    }
    
    cout << ans << endl;
    
    return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#define MOD 1000000007
typedef long long ll;

using namespace std;

ll euc(ll a, ll b) {
    ll temp;
    
    if( a < b ) { temp = a; a = b; b = temp; }
    if( b < 1 ) return -1;
    
    if( a % b == 0 ) return b;
    return euc( b, a % b );
}

bool abc(ll a) {
    if(a <= 2) return true;
    if(a % 2 == 0) return false;

    for(ll j = 3; j <= sqrt(a); j+=2)
    {
        if(a % j == 0)
        {
            return false;
        }
    }
    
    return true;
}

int main() {
    ll a, b;
    cin >> a >> b;
    
    ll max = euc(a, b);
    
    vector<ll> list;
    for(ll i = 1; i <= max; i++) {
        if(max % i == 0) {
            list.push_back(i);
        }
    }
    
    int ans = 0;
    for(ll i = 0; i < list.size(); i++) {
        if(abc(list[i])) {
            ans++;
            // cout << list[i] << endl;
        }
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc:76:4: error: redefinition of 'll euc(ll, ll)'
   76 | ll euc(ll a, ll b) {
      |    ^~~
a.cc:13:4: note: 'll euc(ll, ll)' previously defined here
   13 | ll euc(ll a, ll b) {
      |    ^~~
a.cc:86:6: error: redefinition of 'bool abc(ll)'
   86 | bool abc(ll a) {
      |      ^~~
a.cc:23:6: note: 'bool abc(ll)' previously defined here
   23 | bool abc(ll a) {
      |      ^~~
a.cc:101:5: error: redefinition of 'int main()'
  101 | int main() {
      |     ^~~~
a.cc:38:5: note: 'int main()' previously defined here
   38 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <queue>
#include <algorithm>
#include <numeric>
using namespace std;
long long int solve(long long int a, long long int b) {
	long long int c = a % b;
	if (c == 0)return b;
	return solve(b, c);
}
int main() {
	long long int a;
	long long int b;
	cin >> a;
	cin >> b;
	if (a < b) {
		long long int y = a;
		a = b;
		b = y;
	}
	long long int y = solve(a, b);
	long long int ans = 1;
	long long int cnt = 2;
	
	
	for (int i = 2; i < sqrt(y); i++) {
		if (y % cnt == 0)ans++;
		else {
			cnt++;
			continue;
		}
		while (y % cnt == 0) {
			y = y / cnt;
		}
		cnt++;
	}
	if (y != 1)ans++;
	cout << ans;
}

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

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

 main() {
long long a,b;
cin >> a >>b;
 long long  ans =gcd(a,b);
vector<int>sosu = {2,3,5,7,9,11,13,15,17,19,23,29,31,37,41,43,47,53,59,61,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829
,839	853,857,859,863,877,881,883,887,907,911,919,929,937,941};
int anss =0;
for(int i=0;i<sosu.size();i++){
    if(ans%sosu.at(i)==0){
        anss++;
    ans/=sosu.at(i);
    }
}
cout <<anss+1 <<endl;
}



Compiler output:
a.cc:7:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 |  main() {
      |  ^~~~
a.cc: In function 'int main()':
a.cc:12:9: error: expected '}' before numeric constant
   12 | ,839    853,857,859,863,877,881,883,887,907,911,919,929,937,941};
      |         ^~~
a.cc:11:19: note: to match this '{'
   11 | vector<int>sosu = {2,3,5,7,9,11,13,15,17,19,23,29,31,37,41,43,47,53,59,61,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829
      |                   ^
a.cc:12:9: error: expected ',' or ';' before numeric constant
   12 | ,839    853,857,859,863,877,881,883,887,907,911,919,929,937,941};
      |         ^~~
a.cc: At global scope:
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for(int i=0;i<sosu.size();i++){
      | ^~~
a.cc:14:13: error: 'i' does not name a type
   14 | for(int i=0;i<sosu.size();i++){
      |             ^
a.cc:14:27: error: 'i' does not name a type
   14 | for(int i=0;i<sosu.size();i++){
      |                           ^
a.cc:20:1: error: 'cout' does not name a type
   20 | cout <<anss+1 <<endl;
      | ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long a,b,p;
int y[100000003],ans;
int main()
{
	cin>>a>>b;
	if(a>b)
		swap(a,b);
	p=sqrt(b);
	for(long long i=2; i<=p; i++)
		if(y[i]==0)
		{
			if(__gcd(a,b)==1)
				break;
			if(a%i==0&&b%i==0)
				ans++;
			while(a%i==0&&b%i==0)
				a/=i,b/=i;
			for(int j=1; j*i<=p; j++)
				y[j*i]=1;
		}
	long long yyy=__gcd(a,b),p=sqrt(yyy),fl=0;
	for(long long i=2; i<=p; i++)
		if(yyy%i==0)
			fl++;
	if(fl>=1)
		ans+=flag*2;
	cout<<ans+1;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: 'flag' was not declared in this scope; did you mean 'fl'?
   28 |                 ans+=flag*2;
      |                      ^~~~
      |                      fl
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<queue>
#include<math.h>
#define REP(i,a) for (int i = 0;i < (a);++i)
#define FOR(i,a,b) for (int i = (a);i < (b); ++i)
#define FORR(i,a,b) for (int i = (a);i >= (b); --i)
#define ALL(obj) (obj).begin,(obj).end()
#define SORT(list) sort(ALL((list)));
#define MOD 1000000007
using namespace std;
using ll = long long;
int main(){
    ll a,b;
    cin >> a >> b;
    ll A = max(a,b);
    ll B = min(a,b);
    map <int,int>m;
    ll answer = 0;
    bool flag;
    FOR(i,2,ceil(sqrt(A)+1){
        flag = true;
        while(A%i==0){
            A/=i;
            if(B%i==0){
                if(flag){
                    answer++;
                    cout << i << endl;
                }
                
                flag = false;
            }    
        }
    }
    cout << answer+1 << endl;

    return 0;
}

Compiler output:
a.cc:42:2: error: unterminated argument list invoking macro "FOR"
   42 | }
      |  ^
a.cc: In function 'int main()':
a.cc:25:5: error: 'FOR' was not declared in this scope
   25 |     FOR(i,2,ceil(sqrt(A)+1){
      |     ^~~
a.cc:25:8: error: expected '}' at end of input
   25 |     FOR(i,2,ceil(sqrt(A)+1){
      |        ^
a.cc:17:11: note: to match this '{'
   17 | int main(){
      |           ^
Language: C++

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

bool IsPrime(int num){
  if (num < 2) return false;
  else if (num == 2) return true;
  else if (num % 2 == 0) return false; // 偶数はあらかじめ除く
  long long sqrtNum = 10000000;
  for (int i = 3; i <= sqrtNum; i += 2){
    if(sqrt < i){
      return false;
    }
    if (num % i == 0){
      return false;
    }
  }
  return true;
}

int main(){
  long long A, B;
  cin >> A >> B;
  long long t = max(A, B), s = min(A, B);
  while(t % s != 0){
    long long a = t % s;
    t = s;
    s = a;
  }
  long long inf = 10000000;
  queue<long long> q;
  for(long long i= 1; i < inf; i++){
    if(s < i){
      break;
    }
    if(s % i ==0){
      q.push(i);
    }
  }
  long long ans = 1;
  while(!q.empty()){
    long long p = q.front();
    if(IsPrime(p)){
      ans++;
    }
    q.pop();
  }
  cout << ans << endl;
}
  

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:10:8: error: parse error in template argument list
   10 |     if(sqrt < i){
      |        ^~~~~~~~
a.cc:10:16: error: cannot resolve overloaded function 'sqrt' based on conversion to type 'bool'
   10 |     if(sqrt < i){
      |                ^
Language: C++

//Warmdust Code
#include<iostream>
#include<cstdio>
#include<iomanip>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<set>
#define db double
#define ll long long
#define ull unsigned long long
#define ft float
#define PI acos(-1)
#define L(i,a,b) for(int i=a;i<=b;i++)
#define R(i,a,b) for(int i=a;i>=b;i--)
#define inf 0x3f3f3f3f
#define linf  0x3f3f3f3f3f3f3f3f
#define Warmdust int main(){
#define RETURN return 0;}
#define TvT ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
using namespace std;
const int maxn = 1e7+7;
const int mod = 10000+7;
//int sz[maxn];
//vector<ll>v;
Warmdust
	TvT;
	ll a,b;
	int cnt=0;
	cin >> a >> b;
	ll s= __gcd(a,b);
//	cout << s << endl;
	for(ll i=1;i*i<=s;i++){
		if(s % i == 0) {
			sz[++cnt]= i;
			if(i*i == s) continue;
			sz[++cnt] = s/i;
		}
	}
	sort(sz+1,sz+1+cnt);
	int sum=cnt;
	R(i,cnt,2){
//		int sum = cnt;
		R(j,i-1,2){
			if(sz[i] % sz[j] == 0) {
					sum--;
					break;	
			}
		}
		//mn=min(mn,sum) ;
	}
	cout << sum << endl;
RETURN 


Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: 'sz' was not declared in this scope; did you mean 's'?
   41 |                         sz[++cnt]= i;
      |                         ^~
      |                         s
a.cc:46:14: error: 'sz' was not declared in this scope; did you mean 's'?
   46 |         sort(sz+1,sz+1+cnt);
      |              ^~
      |              s
Language: C++

#include <bits/stdc++.h>

using namespace std;

namespace IntegerMath
{
  int64_t floor_div(int64_t x, int64_t y) {
    return static_cast<int64_t>(
      ::floorl(
        static_cast<long double>(x)
        /
        static_cast<long double>(y)
      )
    );
  }

  int64_t ceil_div(int64_t x, int64_t y) {
    return static_cast<int64_t>(
      ::ceill(
        static_cast<long double>(x)
        /
        static_cast<long double>(y)
      )
    );
  }

  int64_t sqrt(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::sqrtl( 
        static_cast<long double>(x)
      ) )
    );
  }

  int64_t log2(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::log2l( 
        static_cast<long double>(x)
      ) )
    );
  }    

  int64_t log10(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::log10l( 
        static_cast<long double>(x)
      ) )
    );
  }

  int64_t number_of_digits(int64_t x) {
    return static_cast<int64_t>(
      ::ceill( ::log10l( 
        static_cast<long double>(x + 1)
      ) )
    );
  }

  uint64_t gcd(uint64_t a, uint64_t b)
  {
    uint64_t n = std::min(a, b), m = std::max(a, b);
    return (n == 0) ? m : gcd(m % n, n);
  }

  uint64_t lcm(uint64_t a, uint64_t b)
  {
    uint64_t d = gcd(a, b);
    return (a % d == 0) ? (a / d) * b : a * (b / d);
  }
};

vector<bool> build_prime_table(uint64_t N) {
  vector<bool> primes(N + 1, true);
  if (N >= 1) { primes[0] = false; }
  if (N >= 2) { primes[1] = false; }
  for (uint64_t i = 4; i <= N; i += 2) { primes[i] = false; }
  for (uint64_t i = 3; i <= N; i += 2) {
    if (primes[i]) {
      for (uint64_t j = i * 2; j <= N; j += i) {
        primes[j] = false;
      }
    }
  }
  return primes;
}

int main()
{
  uint64_t A, B;
  cin >> A >> B;
  
  uint64_t G = IntegerMath::gcd(A, B);
  uint64_t M = IntegerMath::sqrt(G) << 2;
  uint64_t c = 1;
  vector<bool> primes = build_prime_table(M);
  for (uint64_t x = 1; x <= M; ++x) {
    if (primes[x] && A % x == 0 && B % x == 0) {
      debug(x);
      ++c;
    }
  }
  cout << c << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:98:7: error: 'debug' was not declared in this scope
   98 |       debug(x);
      |       ^~~~~
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <numeric>
#include <cmath>
using namespace std;

int main(){
    int a,b;
    cin >> a >> b;
    int c;
    c=__gcd(a,b);
    int d[c];
    for(int i=0;i<c;++i){
        d[i]=0;
    }
    int j=0;
    for(int i=0;i<sqrt(c);++i){
        if(i!=0){
            if(d[i]==0){
                j=2;
                while(j*(i+1)-1<c){
                    d[j*(i+1)-1]+=-1;
                    j+=1;
                }
            }
        }
    }
    int co=0;
    for(int i=0;i<c;++i){
        if(d[i]==0&&c%(i+1)==0){
            co+=1;
        }
    }
    cout << co;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:36:16: error: expected '}' at end of input
   36 |     cout << co;
      |                ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include<cstdio>
#include<cmath>
#include<climits>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<list>
#include<map>
#include<vector>
 
using namespace std;
 
 
#define rep(i,n) for(int i=0; i<n; i++)
#define rept(i,a,b) for(int i=a; i<b; i++)
#define ll long long
#define MOD 1000000007
 
#define IMIN INT_MIN;
#define IMAX INT_MAX;
 
ll gcd(ll a, ll b) {
    if (b == 0) return a;
    else return gcd(b, a%b);
}
vector<ll> divisors(ll num) {
    vector<ll> ans;
    for(ll i=1; i<=(ll)sqrt(num); i++) {
        if (num % i == 0) {
            ans.push_back(i);
            if (i != num/i) ans.push_back(num/i);
        }
    }
    return ans;
}
bool isprime (ll number) { 
    if (number < 2) return false;
    if (number == 2) return true;
    if (number % 2 == 0) return false;
    for (ll i=3; (i*i) <= number; i+=2) {
        if (number % i == 0 ) return false;
    }
    return true;
}
int n_primes(vector<ll>& divs) {
    int cnt = 0;
    for (auto div : divs) if (isprime(div)) cnt++;
    return cnt;
}
 
int main(){
    ll A, B;
    cin >> A >> B;
    //cout << g << endl;
    vector<ll> divs;
    divs = divisors(g);
    //for(auto i:divs) cout << i << endl;
    int ans;
    ans = n_primes(divs);
    cout << ans << endl;
 
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:21: error: 'g' was not declared in this scope
   60 |     divs = divisors(g);
      |                     ^
Language: C++

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

int n;
 #define ll long long 
 map<ll,ll>arr;
 ll s[1000000000000];
int main()
{
	long long  a,b;
	cin>>a>>b;
	int id=1;long long ans=1;
/long long gc=a;
	for(ll i=2;i<=gc;i++)
	{
		if(arr[i]==0)
		{
		   if(a%i==0&&b%i==0){ans++;}
			//arr[i]=id++;
			for(ll j=2*i;j<=gc;j+=i)
			{
				arr[j]=1;
			}
		}
	
	}cout<<ans;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '/' token
   15 | /long long gc=a;
      | ^
a.cc:15:2: error: expected primary-expression before 'long'
   15 | /long long gc=a;
      |  ^~~~
a.cc:16:23: error: 'gc' was not declared in this scope
   16 |         for(ll i=2;i<=gc;i++)
      |                       ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
using namespace std;
using ll = long long;

// 素因数分解(first要素がfactで、second要素がその個数)
vector<pair<ll, ll>> prime_factorize(ll n) {
    vector<pair<ll, ll>> res;
    for (ll p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}


int main(){
    COMinit(50);

    ll a, b;
    cin >> a >> b;
    auto af = prime_factorize(a);
    auto bf = prime_factorize(b);

    map<ll, ll> m;
    rep(i, af.size()) m[af[i].first] = af[i].second;
    vector<ll> fact;
    rep(i, bf.size()){
        if(m.find(bf[i].first) != m.end()){
            fact.push_back(min(m[bf[i].first], bf[i].second));
        }
    }

    int ans = fact.size() + 1;
    cout << ans << endl;
}

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

#include<bits/stdc++.h>
#define int long long 
using namespace std;
signed main()
{
	
    __int64 a,b;        
    int i,gs=0;
    int p[100];
    scanf("%I64d%I64d",&a,&b);
	__int64 n;
	n=__gcd(a,b);
    
    for(i=2;i*i<=n;i++)  
    {
        if(n%i==0)       
        {
            p[gs++]=i;
            while(n%i==0)  
                n/=i;
        }
       }
    
    if(n>1)               
    {
        p[gs++]=n;
    }
    
    gs++;
    printf("%d",gs);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    7 |     __int64 a,b;
      |     ^~~~~~~
      |     __ynf64
a.cc:10:25: error: 'a' was not declared in this scope
   10 |     scanf("%I64d%I64d",&a,&b);
      |                         ^
a.cc:10:28: error: 'b' was not declared in this scope
   10 |     scanf("%I64d%I64d",&a,&b);
      |                            ^
a.cc:11:16: error: expected ';' before 'n'
   11 |         __int64 n;
      |                ^~
      |                ;
a.cc:12:9: error: 'n' was not declared in this scope
   12 |         n=__gcd(a,b);
      |         ^
Language: C++

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

int n;
 #define ll long long 
 map<ll,ll>arr;
 ll s[1000000000000];
int main()
{
	long long  a,b;
	cin>>a>>b;
	int id=1;long long ans=1;
//	long long gc=__gcd(a,b);
	for(ll i=2;i<=a;i++)
	{
		if(arr[i]==0)
		{
		   if(a%i==0&&b%i==0){ans++;}
			//arr[i]=id++;
			for(ll j=2*i;j<=gc;j+=i)
			{
				arr[j]=1;
			}
		}
	
	}cout<<ans;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:41: error: 'gc' was not declared in this scope
   22 |                         for(ll j=2*i;j<=gc;j+=i)
      |                                         ^~
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>
#include <math.h>

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

int coprime(int a, int b) {
  return (gcd(a, b) == 1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   61 |       if(coprime(so[j], so[k]) == 1){
      |          ^~~~~~~
      |          ctime
Language: C++

#include<bits/stdc++.h>

#define REPI(i, n) for(int i = 0; i < n; i++)
#define REPJ(j, n) for(int j = 0; j < n; j++)

using ll = long long;
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a, b; cin >> a >> b;
    int small = min(a, b);
    vector<int> vc;
    bool flag;

    for(int i = 1; i <= small; i++)
        if((a % i | b % i) == 0)
            vc.push_back(i);

    int vc_length = vc.size();
    int negative = 0;
    for(int i = 1; i < vc_length; i++)
        for(int j = i; j < vc_length; j++)
            if(vc[i] != 0){


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: expected '}' at end of input
   26 |             if(vc[i] != 0){
      |                           ~^
a.cc:26:28: error: expected '}' at end of input
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
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 = 0;
  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];
  
  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++;
  }
  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], so[k]) == 1){
        if(so[j] >= so[k]){
          f = so[j];
        }else{
          f = so[k];
        }
      }
    }
  }
  cout << f << endl;
}

int coprime(int a, int b) {
  return (gcd(a, b) == 1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   60 |       if(coprime(so[j], so[k]) == 1){
      |          ^~~~~~~
      |          ctime
Language: C++

#include<stdio.h>

int uqr(int a,int b){
  int amari;
  if(a % b == 0)
    return b;
  return uqr(b,a%b);
}

int main(){
  int a,b,box;
  scanf("%d %d",&a,&d);
  if(a<b){
    box = a;
    a = b;
    b = box;
  }
  printf("%d",uqr(a,b));
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'd' was not declared in this scope
   12 |   scanf("%d %d",&a,&d);
      |                     ^
Language: C++

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

int main(){
	int a,b,tmp,r,i,j,ans;
	cin >> a >> b;
	
	if(a<b){
		tmp = a;
    	a = b;
    	b = tmp;
	}
  
  	r = a % b;
  	while(r!=0){
    	a = b;
    	b = r;
    	r = a % b;
  	}//bが最大公約数

  	ans=0;
  	for(i=1; i<10000000; i++){
  		if(b%i==0){
  			ans ++;
  			while(b%i != 0){
              b = b/i;
  		}
  	}

  	cout << ans << endl;

}

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

#include <iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(a<=b){
    c=a;
  }
  else if(a>b){
    c=b;
  }
  int num[c],count=0;
  for (int i=1;i<=c;i++){
    if(a%i==0||b%i==0){
      num[count]=i;
      count++;
    }
  }
  int mem[count]=1,ans=0;
  for (int i=0;i<count;i++){
    int jud=0;
    for (int j=0;j<count;j++){
      if(num[i]%mem[j]!=0){
        jud=1;
        break;
      }
    }
    if(jud==0){
      mem[i]=num[i];
      ans++;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'c' was not declared in this scope
    7 |     c=a;
      |     ^
a.cc:10:5: error: 'c' was not declared in this scope
   10 |     c=b;
      |     ^
a.cc:12:11: error: 'c' was not declared in this scope
   12 |   int num[c],count=0;
      |           ^
a.cc:15:7: error: 'num' was not declared in this scope; did you mean 'enum'?
   15 |       num[count]=i;
      |       ^~~
      |       enum
a.cc:19:18: error: array must be initialized with a brace-enclosed initializer
   19 |   int mem[count]=1,ans=0;
      |                  ^
a.cc:23:10: error: 'num' was not declared in this scope; did you mean 'enum'?
   23 |       if(num[i]%mem[j]!=0){
      |          ^~~
      |          enum
a.cc:29:14: error: 'num' was not declared in this scope; did you mean 'enum'?
   29 |       mem[i]=num[i];
      |              ^~~
      |              enum
Language: C++

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

int main(){
  int A,B; cin>>A>>B;
  int count=0;
  for(int i=1;i<max(A,B);i++){
    if(A%i==0&&B%i==0){//公約数かどうか
      bool flag=false;
      for(int j=1;j<i;j++){//その公約数が素数かどうか
        if(i%j==0&&j!=1)flag=true;//割り切れてしまったら旗を揚げる
      }
      if(flag==false){
        count++
      }
    }
  }
  cout<<count<<endl;
  return 0;
}

//公約数を出す
//その中から素数の数を数える（１があるのでプラス１）

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
llt isP(ll k){
	for(ll i = 2;i * i <= k;i++){
		if(k % i == 0) return 0;
	}
	return 1;
}
ll gcd(ll a,ll b){
    while(b){
        ll t = b;
        b = a % b;
        a = t;
    }
    return a;
}
int main(){
	ll a,b;
	cin >> a >> b;
	ll t = gcd(a,b);
	if(t == 1){
		cout << 1 << endl;
		return 0;
	}
	ll cnt = 0;
	for(ll i = 1;i <= sqrt(t);i++){
		ll j = t / i;
		if(i * j == t){
			if(isP(i))
				cnt++;
			if(isP(j))
				cnt++;
		}		
	}
	printf("%lld\n",cnt);
	return 0;
}

Compiler output:
a.cc:4:1: error: 'llt' does not name a type; did you mean 'll'?
    4 | llt isP(ll k){
      | ^~~
      | ll
a.cc: In function 'int main()':
a.cc:30:28: error: 'isP' was not declared in this scope
   30 |                         if(isP(i))
      |                            ^~~
a.cc:32:28: error: 'isP' was not declared in this scope
   32 |                         if(isP(j))
      |                            ^~~
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 = 0;
  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];
  
  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++;
  }
  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], so[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:60:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   60 |       if(coprime(so[j], so[k]) == 1){
      |          ^~~~~~~
      |          ctime
a.cc:69:2: error: expected '}' at end of input
   69 | }
      |  ^
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

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

long long gcd(long long a,long long b) {
    long long c;
    while (a % b != 0) {
        c = a % b;
        a = b;
        b = c;
    }
    return b;
}

int main() {
    long long A,B;
    cin >> A;
    cin >> B;
    
    int answer;
    answer = 1;

    long long c,d;
    c = gcd(A,B);
    d = 3;

    if (c % 2 == 0) {
        a += 1;
        while (c % 2 == 0) {
            c /= 2;
        }
    }
    while (c > 2) {
        if (c % d == 0) {
            answer += 1;
        }
        while (c % d == 0) {
            c /= d;
        }   
        d += 2;
    }

    cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'a' was not declared in this scope
   27 |         a += 1;
      |         ^
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 = 0;
  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];
  
  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++;
  }
  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], so[k]) == 1){
        if(so[j] >= so[k]){
          f = so[j];
        }else{
          f = so[k];
        }
    }
  }
  cout << f << endl;
}
    
    int coprime(int a, int b){
    return gcd(a, b);
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:60:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   60 |       if(coprime(so[j], so[k]) == 1){
      |          ^~~~~~~
      |          ctime
a.cc:71:30: error: a function-definition is not allowed here before '{' token
   71 |     int coprime(int a, int b){
      |                              ^
a.cc:73:4: error: expected '}' at end of input
   73 |   }
      |    ^
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define  N  350000000
int a[N];
int really[N];
int sushu[N];
int dp[N];
int cnt_su=1; 
void susai()
{
    memset(really, true, sizeof(really));
    //memset(dp, 0, sizeof(dp));
    //dp[1]=1;
    sushu[1]=1;
    for(int i=2; i<=N; i++)
    {
        //dp[i]=dp[i-1];
        if(really[i])
        {
           // dp[i]++;
            sushu[++cnt_su]=i;
            for(int j=2*i; j<=N; j+=i) really[j]=false;
        }
    }
}
 
signed  main(){
	susai();
    int n,m;cin>>n>>m;
   // i
   if(n==1||m==1){
   	cout<<"1";return 0;
   }
    int cnt=0;
    int ans=0;
    for(int i=2;i<=sqrt(min(n,m));i++){
    	if(n%i==0&&m%i==0){
    		a[cnt++]=i;
    		if(really[i])
    			ans++;
		}
	}
	cout<<ans+1;
    return 0;
}
/*
1 2 3 5 
*/

Compiler output:
/tmp/cc6kIKcn.o: in function `susai()':
a.cc:(.text+0x18): relocation truncated to fit: R_X86_64_PC32 against symbol `really' defined in .bss section in /tmp/cc6kIKcn.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `sushu' defined in .bss section in /tmp/cc6kIKcn.o
a.cc:(.text+0x4b): relocation truncated to fit: R_X86_64_PC32 against symbol `really' defined in .bss section in /tmp/cc6kIKcn.o
a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `sushu' defined in .bss section in /tmp/cc6kIKcn.o
a.cc:(.text+0xa4): relocation truncated to fit: R_X86_64_PC32 against symbol `really' defined in .bss section in /tmp/cc6kIKcn.o
/tmp/cc6kIKcn.o: in function `main':
a.cc:(.text+0x1b5): relocation truncated to fit: R_X86_64_PC32 against symbol `really' defined in .bss section in /tmp/cc6kIKcn.o
collect2: error: ld returned 1 exit status
Language: C++

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

using namespace std;

long yukuriddo(long a, long b) {
	if (a < b) swap(a, b);

	while (a % b > 0) {
		long c = a % b;
		a = b;
		b = c;
	}

	return b;
}

int main()
{
	long a, b;
	cin >> a >> b;
	vector<long> yakusuu;
	yakusuu.push_back(1);
  	long pluss[] = {2,4};


	long max = yukuriddo(a, b);

	if (max % 2 == 0) {
		max /= 2;
		yakusuu.push_back(2);
		while (max % 2 == 0) max /= 2;
	}
  	if (max % 3 == 0) {
		max /= 3;
		yakusuu.push_back(3);
		while (max % 3 == 0) max /= 3;
	}

	//遅いならこの式をどうにかしろ
    int ind = 1;
	for(long index = 5; max > 1; index+=pluss[ind]) {
        ind = (ind + 1) % 2;
        count--;
		if (max % index == 0) {
			max /= index;
			yakusuu.push_back(index);
            while (max % index == 0) max /= index;

		}
	}

	cout << yakusuu.size() << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:14: error: no post-decrement operator for type
   45 |         count--;
      |              ^~
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 = 0;
  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];
  
  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++;
  }
  //公約数の素の最大
  for(j = 0; j <= i - 1; j++){
    for(k = 1; k <= i; k++){
      if(coprime(so[j], so[k]) == 1)){
        if(so[j] >= so[k]){
          f = so[j];
        }else{
          f = so[k];
        }
    }
  }
  cout << f << endl;
}
    
    int coprime(int a, int b) {
    return gcd(a, b);
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:60:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   60 |       if(coprime(so[j], so[k]) == 1)){
      |          ^~~~~~~
      |          ctime
a.cc:60:37: error: expected primary-expression before ')' token
   60 |       if(coprime(so[j], so[k]) == 1)){
      |                                     ^
a.cc:71:31: error: a function-definition is not allowed here before '{' token
   71 |     int coprime(int a, int b) {
      |                               ^
a.cc:73:4: error: expected '}' at end of input
   73 |   }
      |    ^
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 = 0;
  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];
  
  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++;
  }
  //公約数の素の最大
  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;
}
    
    int coprime(int a, int b) {
    return gcd(a, b);
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:60:26: error: invalid types 'int[int]' for array subscript
   60 |       if(coprime(so[j], b[k]) == 1)){
      |                          ^
a.cc:60:10: error: 'coprime' was not declared in this scope; did you mean 'ctime'?
   60 |       if(coprime(so[j], b[k]) == 1)){
      |          ^~~~~~~
      |          ctime
a.cc:60:36: error: expected primary-expression before ')' token
   60 |       if(coprime(so[j], b[k]) == 1)){
      |                                    ^
a.cc:71:31: error: a function-definition is not allowed here before '{' token
   71 |     int coprime(int a, int b) {
      |                               ^
a.cc:73:4: error: expected '}' at end of input
   73 |   }
      |    ^
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <queue>
#include <stack>
#include <set>
#include <map>

using namespace std;

size_t f(size_t a, size_t b) {
    if (b > a)
        return f(b, a);
    auto c = a % b;
    if (c == 0)
        return b;
    return f(b, c);
}

int main() {
    size_t a, b;
    cin >> a >> b;
    auto c = min(a, b);
    auto x = sqrt(c);
    auto d = size_t(sqrt(c) + 1.0);
    vector<size_t> v;
    v.reserve(d);
    for (size_t i = 1; i <= d; ++i) {
        if (a % i == 0 && b % i == 0)
            v.emplace_back(i);
    }
    size_t e = 0;
    for (size_t i = 0; i < v.size(); ++i) {
        bool flag = true;
        for (size_t j = 0; j < i; ++j) {
            if (f(v[i], v[j]) != 1) {
                flag = false;
                break;
            }
        }
        if (flag)
            ++e;
    }
    cout << e << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: 'sqrt' was not declared in this scope
   26 |     auto x = sqrt(c);
      |              ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <numeric>

using namespace std;

typedef long long ll;

bool IsPrime(ll num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く
    
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }
    
    // 素数である
    return true;
}

ll euclidean_gcd(ll a, ll b) {
    if(a < b) return euclidean_gcd(b, a);
    ll r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}

int main(void)
{
    ll a, b;
    ll ans = 1;
    vector<ll> s;
    
    cin >> a >> b;
    
    if (a % 2 == 0 && b % 2 == 0) {
        ans++;
        s.push_back(2);
    }
    
    s.push_back(1);
    
    double sqrtNum = min(a,b));
    for (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (a % i == 0 && b % i == 0 ) {
            bool flag = true;
            for (int j = 0; j < s.size(); ++j) {
                if (euclidean_gcd(s[j], i) != 1) {
                    flag = false;
                    break;
                }
            }
            if (flag){
                ans++;
                s.push_back(i);
                //cout << i << endl;
            }
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:30: error: expected ',' or ';' before ')' token
   58 |     double sqrtNum = min(a,b));
      |                              ^
Language: C++

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

int main(){
  int ans = 1;
  long long int a, b, tmp;
  vector<long long int> v;

  cin >> a >> b;
  
  //aの素数の約数を全て求める
  tmp = a;
  for(int i=2;i<=(int)sqrt(tmp);i++){
    int flag = 0;
    while(tmp%i==0){
      tmp/=i;
      //cout << "[" << tmp << "]";
      flag = 1;
    }
    if(flag==1){
      //cout << "(" << i << ")";
      v.push_back(i);
    }
    if(tmp<i){
      break;
    }
  }
  if(v.size()>0){
    if(tmp!=1&&v[v.size()-1]!=tmp)
    {
      v.push_back(tmp);
    }
  }else{
    v.puch_back(tmp);
  }
  
  for(int i=0;i<v.size();i++){
    //cout << "(" << v[i] << ")";
    if(b%v[i]==0){
      ans++;
    }
  }
  cout << ans;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:7: error: 'class std::vector<long long int>' has no member named 'puch_back'; did you mean 'push_back'?
   34 |     v.puch_back(tmp);
      |       ^~~~~~~~~
      |       push_back
Language: C++

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

int main(){
  int64_t a,b;
  int64_t tmp;
  int64_t r;
  cin>>a >> b;
  
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
  int64_t m = b;
  vector<int> x(m + 1,0);

  int64_t num = m;
  int64_t count = 1;
  for (int64_t i = 2; i <= m; i++) {
    while (num%i == 0) {
      x.at(i)++;
      num /= i;a
    }
  }
  
  for(int64_t i = 0; i<m+1; i++){
    if(x.at(i) != 0){
      count++;
    }
  }
  
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: expected ';' before '}' token
   29 |       num /= i;a
      |                 ^
      |                 ;
   30 |     }
      |     ~