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

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<math.h>
using namespace std;
#define int long long;
int gcd(long long a, long long b)
{
	if (a % b == 0)
	{
		return(b);
	}
	else
	{
		return(gcd(b, a % b));
	}
}
bool IsPrime(long long num)
{
	if (num < 2) return false;
	else if (num == 2) return true;
	else if (num % 2 == 0) return false;

	double sqrtNum = sqrt(num);
	for (int i = 3; i <= sqrtNum; i += 2)
	{
		if (num % i == 0)
		{
			return false;
		}
	}
	return true;
}
int main() {
	long long A, B;
	cin >> A >> B;
	long long i, j, k;
	long long ans = 0;
	long long GCD = gcd(A, B);
	if (A % 1 == 0 && B % 1 == 0)ans++;
	for (i = 1; i <= sqrt(GCD); i += 1)
	{
		if (IsPrime(i) == true && A % i == 0 && B % i == 0)ans++;
		if (IsPrime(GCD / i) == true && A % i == 0 && B % i == 0)ans++;
	}
	cout << ans;
}

Compiler output:
a.cc:7:18: error: declaration does not declare anything [-fpermissive]
    7 | #define int long long;
      |                  ^~~~
a.cc:8:1: note: in expansion of macro 'int'
    8 | int gcd(long long a, long long b)
      | ^~~
a.cc:8:5: error: ISO C++ forbids declaration of 'gcd' with no type [-fpermissive]
    8 | int gcd(long long a, long long b)
      |     ^~~
a.cc: In function 'bool IsPrime(long long int)':
a.cc:7:18: error: declaration does not declare anything [-fpermissive]
    7 | #define int long long;
      |                  ^~~~
a.cc:26:14: note: in expansion of macro 'int'
   26 |         for (int i = 3; i <= sqrtNum; i += 2)
      |              ^~~
a.cc:26:18: error: 'i' was not declared in this scope
   26 |         for (int i = 3; i <= sqrtNum; i += 2)
      |                  ^
a.cc:26:37: error: expected ')' before ';' token
   26 |         for (int i = 3; i <= sqrtNum; i += 2)
      |             ~                       ^
      |                                     )
a.cc:26:39: error: 'i' was not declared in this scope
   26 |         for (int i = 3; i <= sqrtNum; i += 2)
      |                                       ^
a.cc: At global scope:
a.cc:7:18: error: declaration does not declare anything [-fpermissive]
    7 | #define int long long;
      |                  ^~~~
a.cc:35:1: note: in expansion of macro 'int'
   35 | int main() {
      | ^~~
a.cc:35:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   35 | int main() {
      |     ^~~~
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;
	bool f = false;
	for (long index = 5; max > 1; index += pluss[ind]) {
		f = true;
		if (sqrt(max) < index) break;
		ind = (ind + 1) % 2;
		if (max % index == 0) {
			max /= index;
			yakusuu.push_back(index);
			while (max % index == 0) max /= index;
		}
	}

	if(f) yakusuu.push_back(max);

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:21: error: 'sqrt' was not declared in this scope
   45 |                 if (sqrt(max) < index) break;
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
//エラトステネスの篩
bool is_prime[100000000000 + 1];
vector<int> P;
void Eratosthenes(const int N) {
    for(int i = 0; i <= N; i++) {
        is_prime[i] = true; //初期化
    }
    for(int i = 2; i <= N; i++) {
        if(is_prime[i]) {
            for(int j = 2 * i; j <= N; j += i) {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
}
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    int A, B;
    cin >> A >> B;
    int x = gcd(A, B);
    int ans = 1;

    Eratosthenes(x);

    for(const auto &x : P) {
        if(A % x != 0) {
            continue;
        }
        if(B % x != 0) {
            continue;
        }
        ans++;
    }

    cout << ans << endl;
}


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

int main(){
    long long A,B,ans=0;
    cin >> A >> B;
    long long maxgcd = __gcd(A,B);
    long long A_r = pow(A,0.5) + 1;
    long long B_r = pow(A,0.5) + 1;
    vector<long long> K;
    for(long i=2;i<A_r && i<B_r && i<=maxgcd;++i){
        bool flag = true;
        if(A%i==0 && B%i==0){
            for(long j=0;j<K.size();++j){
                if(i%K[j]==0){
                    flag = false;
                    break;
                }
            }
            if(flag){
                K.push_back(i);
                ++ans;
            }
        }
    }
    cout << ans+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> A >> B;
      |     ^~~
a.cc:4:24: error: '__gcd' was not declared in this scope
    4 |     long long maxgcd = __gcd(A,B);
      |                        ^~~~~
a.cc:5:21: error: 'pow' was not declared in this scope
    5 |     long long A_r = pow(A,0.5) + 1;
      |                     ^~~
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<long long> K;
      |     ^~~~~~
a.cc:7:12: error: expected primary-expression before 'long'
    7 |     vector<long long> K;
      |            ^~~~
a.cc:11:28: error: 'K' was not declared in this scope
   11 |             for(long j=0;j<K.size();++j){
      |                            ^
a.cc:18:17: error: 'K' was not declared in this scope
   18 |                 K.push_back(i);
      |                 ^
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout << ans+1 << endl;
      |     ^~~~
a.cc:23:22: error: 'endl' was not declared in this scope
   23 |     cout << ans+1 << endl;
      |                      ^~~~
Language: C++

#include<iostream>
#include <cmath>
#include<vector>
using namespace std;
bool IsPrime(int num);
int main()
{
  
  unsigned long int A, B;
  cin >> A;
  cin >> B;
  int maxC = 0;
  if(A<B){
    unsigned long int tmp = A;
    A = B;
    B = tmp;
  }
  int r = A%B;
  while(r!=0){
    A = B;
    B = r;
    r = a%b;
  }
  
  int count=0;
  for(int i=1; i<=b; i++){
    if(b%i==0){
      if(IsPrime(i)){
        count++;
      }
    }
  }
  cout << count+1 << endl;
  return 0;
}

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

    // 素数である
    return true;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'a' was not declared in this scope
   22 |     r = a%b;
      |         ^
a.cc:22:11: error: 'b' was not declared in this scope
   22 |     r = a%b;
      |           ^
a.cc:26:19: error: 'b' was not declared in this scope
   26 |   for(int i=1; i<=b; i++){
      |                   ^
Language: C++

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

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;
  int ans = 0;
  for(int i=2;i<=sqrt(min(a,b))+1;i++){
    if(prime(i)){
      if(a%i == 0 && b%i == 0){
        ans++;
        if(
      }
    }
  }
  
  cout << ans+1 << endl;
  
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: expected primary-expression before '}' token
   27 |       }
      |       ^
a.cc:26:12: error: expected ')' before '}' token
   26 |         if(
      |           ~^
      |            )
   27 |       }
      |       ~     
a.cc:27:7: error: expected primary-expression before '}' token
   27 |       }
      |       ^
Language: C++

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

using namespace std;
bitset<1001000> bs;
vector<int> primes;

void sieve(long long upperbound)
{
    upperbound++;
    bs.set();
    bs[0] = bs[1] = 0;
    for (long long i = 0; i < upperbound; i++)
    {
        if (bs[i])
        {
            for (long long j = i * i; j < upperbound; j+=i)
                bs[j] = 0;
            primes.push_back((int)i);
        }
    }
}

/*vector<long long> primeFactors(long long n)
{
    vector<long long> factors;
    long long og = n;
    factors.push_back(n);
    factors.push_back(1);
    long long PDF_id = 0, PF = primes[PDF_id];
    while (PF * PF <= n)
    {
        int y = 1;
        while (n % PF == 0)
        {
            n /= PF;
            long long diviser = PF*(y++);
            factors.push_back(diviser);
            factors.push_back(og/diviser);
        }
        PF = primes[++PDF_id];
    }
    if (n != 1)
        factors.push_back(n);
    return factors;
}*/

vector<long long> primeFactors(long long n){
    vector<long long> factors;
    for (long long i = 1; i < sqrt(n); i++)
    {
        if(n%i == 0){
            if(n/i == i)
                factors.push_back(i);
            else{
                factors.push_back(i);
                factors.push_back(n/i);
            }
        }
    }
    return factors;
}

int gcd(int a, int b){
    return b == 0 ? a : gcd(b, a%b);
}

int main()
{
    long long a, b;
    cin >> a >> b;
    sieve(1000000);
    vector<long long> aa = primeFactors(a);
    vector<long long> bb = primeFactors(b);
    sort(aa.begin(), aa.end());
    sort(bb.begin(), bb.end());
    vector<long long> v(aa.size()+bb.size());
    vector<long long>::iterator it, st, rt;
    it = set_intersection(aa.begin(), aa.end(), bb.begin(), bb.end(), v.begin());
    vector<int> sol;
    for (st = v.begin(); st != it; ++st)
    {
        if(find(sol.begin(), sol.end(), *st) == sol.end()){
            bool go = true;
            for (int i = 0; i < sol.size(); i++)
            {
                if(gcd(sol[i], *st) != 1)
                    go = false;
            }
            if(go)
                sol.push_back(*st);
        }
    }
    cout << sol.size();
    return 0;
}

/*
#include <iostream>
#include <vector>
#include <bitset>
#include <algorithm>

using namespace std;


int main()
{
    return 0;

}
*/
/*
#include <iostream>
#include <vector>
#include <bitset>
#include <algorithm>

using namespace std;


int main()
{
    return 0;

}
*/

Compiler output:
a.cc: In function 'std::vector<long long int> primeFactors(long long int)':
a.cc:52:31: error: 'sqrt' was not declared in this scope
   52 |     for (long long i = 1; i < sqrt(n); i++)
      |                               ^~~~
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();
        a = Math.min(f, s);
        b = Math.max(f, s);
        Set<Long> set_a = new HashSet<Long>();
        // Set<Long> set_b = new HashSet<Long>();

        for(long i = 2; i <= a; i++){
            if(a % i == 0) set_a.add(i);
            else continue;
            while(a % i == 0){
                a /= i;
            }
            if(a == 1 || i * i > f) break;
        }
        // for(long i = 2; i <= b; i++){
        //     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 + 1);

    }

}


Compiler output:
Main.java:11: error: cannot find symbol
        a = Math.min(f, s);
        ^
  symbol:   variable a
  location: class Main
Main.java:12: error: cannot find symbol
        b = Math.max(f, s);
        ^
  symbol:   variable b
  location: class Main
Main.java:16: error: cannot find symbol
        for(long i = 2; i <= a; i++){
                             ^
  symbol:   variable a
  location: class Main
Main.java:17: error: cannot find symbol
            if(a % i == 0) set_a.add(i);
               ^
  symbol:   variable a
  location: class Main
Main.java:19: error: cannot find symbol
            while(a % i == 0){
                  ^
  symbol:   variable a
  location: class Main
Main.java:20: error: cannot find symbol
                a /= i;
                ^
  symbol:   variable a
  location: class Main
Main.java:22: error: cannot find symbol
            if(a == 1 || i * i > f) break;
               ^
  symbol:   variable a
  location: class Main
Main.java:44: error: cannot find symbol
            if(b % x == 0) count++;
               ^
  symbol:   variable b
  location: class Main
8 errors
Language: C++

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

  //最大公約数
int gcd(int64_t a,int64_t b){
  int64_t c;
  c=a;
  a=max(a,b);
  b=min(c,b);
  c=a;
  while(b > 0){
    a = b;
    b = c % b;
    c = a;
  }
  return a;
}
int main() {
  int64_t A,B;
  cin>>A>>B;
  int64_t X =gcd(A,B);
  int64_t rootX;
  if(X <10000000)
    rootX = X;
  else
    rootX = X/100000;
  int answer =1;
  for(int64_t i=2;i<rootX;i++){
    if(X%i ==0){
      answer++;
      while(X%i ==0)
        X=X/i;
    }
  }
  cout <<answer;

Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: expected '}' at end of input
   35 |   cout <<answer;
      |                 ^
a.cc:18:12: note: to match this '{'
   18 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main{
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int count = 1;
        if(A==1 || B==1)
        else if((A==2 || B==2) && A%2==0 && B%2==0)count++;
        else if((A==2 || B==2) && A%2==1 || B%2 == 1)
        else{
        if(A%2 == 0 && B%2 == 0) count++;
            for(int i = 3; i <= Math.max(A,B); i = i+2){
                boolean a = false;
                if(A%i == 0 && B%i == 0) a = true;
                if(a == true){
                    boolean b = true;
                    for(int x = 3; x < i; x=x+2){
                        if(i%x == 0) b = false;
                        break;
                    }
                    if(b == true) count++;
                } 
            }
System.out.print(count);

    }
}


Compiler output:
Main.java:11: error: 'else' without 'if'
        else{
        ^
Main.java:9: error: 'else' without 'if'
        else if((A==2 || B==2) && A%2==0 && B%2==0)count++;
        ^
Main.java:28: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

import java.util.*;

public class D{

    public static void main(String args[]){

        Scanner sc = new Scanner(System.in);

		long a = sc.nextLong();
		long b = sc.nextLong();
        a = Math.min(a, b);
        Set<Long> set_a = new HashSet<Long>();
        // Set<Long> set_b = new HashSet<Long>();

        for(long i = 2; i <= a; i++){
            if(a % i == 0) set_a.add(i);
            else continue;
            while(a % i == 0){
                a /= i;
            }
            if(a == 1 || i * i > a) break;
        }
        // for(long i = 2; i <= b; i++){
        //     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 + 1);

    }

}


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;
const long long maxn=(1e6+10);
long long a,b,ans=0,cnt=0;
bool isprime[maxn];
long long gcd(long long x,long long y)
{
	while(y)
	{
		long long tmp=x%y;
		x=y;
		y=tmp;
	}
	return x;
}
int main()
{
	cin>>a>>b;
	long long x=gcd(a,b);
	if(x==1)
	{
		cout<<1<<endl;
		return 0;
	}
	for(long long i=2;i*i<=x;i++)
		if(!isprime[i])
			for(long long j=i*i;j<=sqrt(x);j+=i)
				isprime[j]=true;
	for(long long i=2;i*i<=x;i++)
	{
		if(x%i==0)
			++cnt;
		if(cnt==2)
			break;
	}
	if(!cnt)
	{
		cout<<2<<endl;
		return 0;
	}
	if(cnt==1)
	{
		if(sqrt(x)*sqrt(x)==x)
		{
			if(!isprime[sqrt(x)])
				cout<<2<<endl;
			else
				cout<<1<<endl;
		}
		else
			cout<<3<<endl;
		return 0;
	}
	for(long long i=2;i*i<=x;i++)
		if(x%i==0)
			if(!isprime[i])
				++ans;
	cout<<ans+1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:36: error: invalid types 'bool [1000010][__gnu_cxx::__enable_if<true, double>::__type {aka double}]' for array subscript
   45 |                         if(!isprime[sqrt(x)])
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
bool is_prime[1000000000000 + 1];
vector<int> P;
void Eratosthenes(const int N) {
    for(int i = 0; i <= N; i++) {
        is_prime[i] = true; //初期化
    }
    for(int i = 2; i <= N; i++) {
        if(is_prime[i]) {
            for(int j = 2 * i; j <= N; j += i) {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
}
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    int A, B;
    cin >> A >> B;
    int x = gcd(A, B);
    int ans = 1;

    Eratosthenes(x);

    for(const auto &x : P) {
        if(A % x != 0) {
            continue;
        }
        if(B % x != 0) {
            continue;
        }
        ans++;
    }

    cout << ans << endl;
}


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

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include<map>
#include<queue>
#define rep(i, n) rep2(i,0,n)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
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 double sqrtNum = sqrt(num);
	for (int i = 3; i <= sqrtNum; i += 2)
	{
		if (num % i == 0)
		{
			// 素数ではない
			return false;
		}
	}

	// 素数である
	return true;
}

void prime(int n, queue<int> &q) {

	rep2(i, 2, n) {
		if (IsPrime(i)) q.push(i);
	}
}
int main()
{
	int a, b;
	cin >> a >> b;

	int n = min(a, b);
	queue<int> q;

	prime(n, q);

	int count = 1;

	int N = q.size();
	vector<int> p(N);
	rep(i, N) {
		int a = q.front(); q.pop();
		p.at(i) = a;
	}
	rep(i, N) {
		if (a% p.at(i) == 0 && b% p.at(i) == 0) ++count;
	}
	cout << count << endl;
}

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:19:31: error: 'sqrt' was not declared in this scope
   19 |         long double sqrtNum = sqrt(num);
      |                               ^~~~
Language: C++

// #include <iostream>
// #include <string>
// #include <math.h>
// #include <map>
// #include <vector>
// #include <tuple>
// #include <algorithm>
// #include <queue>
#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define vi vector<int>
#define vlli vector<lli>
#define pii pair<int, int>
#define plli pair <lli, lli>
#define F(i,n) for(lli (i)=0;(i)<(n);(i)++)
#define FR(i,n) for(lli (i)=(n)-1;(i)>=0;(i)--)
#define FSG(i,a,b) for(lli (i)=(a);(i)<(b);(i)++)
#define FSGR(i,a,b) for(lli (i)=(b)-1;(i)>=(a);(i)--)
#define VAL(n) cout << n << endl;
#define VALD(n) cout << #n << ": " << n << endl;
bool IsPrime(long long num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;

    long long sqrtNum = sqrt(num);
    for (long long i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}
int main(){
  long long A, B;
  cin >> A >> B;
  long long minv = min(A, B);
  long long maxv = max(A, B);
  long long cnt = 1;
  if(minv %2 == 0){
    if(maxv % 2 == 0){
      cnt ++;
    }
    long long tmp = minv / 2;
    if(tmp != 2 && maxv % tmp == 0 && IsPrime(tmp)){
      cnt++;
    }

  }
  long long a = 3;
  while(minv >= a*a){
    if(minv%a == 0){
      if(maxv % a == 0 && IsPrime(a)){
        cnt++;
      }
      tmp = minv / a;
      if(tmp != a && maxv % tmp == 0 && IsPrime(tmp)){
        cnt++;
      }
    }
    a+=2;
  }
  cout << cnt << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:7: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   61 |       tmp = minv / a;
      |       ^~~
      |       tm
Language: C++

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

long long euclid(long long a, long long b){
  long long red = a % b;
  if (red == 0){
    return b;
  } else {
    a = std::max(red, b);
    b = std::min(red, b);
    return euclid(a,b);
  }
}

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

int main(){
  long long A, B;
  scanf("%lld %lld",&A, &B);
  long long c = euclid(std::max(A,B),std::min(A,B));
  if (is_prime(c)){
    printf("2\n");
    return 0;
  }
  //printf("c=%d\n",c);
  long long ans=1; //1は回答の前提としておく
  long long root_c = int(sqrt(c))+1;
  for (long long i=2; i<=min(c,root_c); i++){
      if (c%i==0){
       ans++;
       c = c/i;
       while(c%i==0){
        c = c/i;
       }
      }
  }
  printf("%lld\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:26: error: 'min' was not declared in this scope; did you mean 'std::min'?
   41 |   for (long long i=2; i<=min(c,root_c); i++){
      |                          ^~~
      |                          std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
bool is_prime[10000000000000 + 1];
vector<ll> P;
void Eratosthenes(const ll N) {
    for(ll i = 0; i <= N; i++) {
        is_prime[i] = true; //初期化
    }
    for(ll i = 2; i <= N; i++) {
        if(is_prime[i]) {
            for(ll j = 2 * i; j <= N; j += i) {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
}
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    ll A, B;
    cin >> A >> B;
    ll x = gcd(A, B);
    ll ans = 1;

    Eratosthenes(x);

    for(const auto &x : P) {
        if(A % x != 0) {
            continue;
        }
        if(B % x != 0) {
            continue;
        }
        ans++;
        // cout << x << " ";
    }

    cout << ans << endl;
}


Compiler output:
/tmp/ccNEarRq.o: in function `Eratosthenes(long long)':
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccNEarRq.o
/tmp/ccNEarRq.o: in function `main':
a.cc:(.text+0x149): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccNEarRq.o
/tmp/ccNEarRq.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x21d): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccNEarRq.o
a.cc:(.text+0x236): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccNEarRq.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include<map>
#include<queue>
#define rep(i, n) rep2(i,0,n)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using namespace std;

bool IsPrime(int num)
{
	if (num < 2) return false;
	else if (num == 2) return true;
	else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

	// 素数である
	return true;
}

void prime(int n, queue<int> &q) {

	rep2(i, 2, n) {
		if (IsPrime(i)) q.push(i);
	}
}
int main()
{
	int a, b;
	cin >> a >> b;

	int n = min(a, b);
	queue<int> q;

	prime(n, q);

	int count = 1;

	int N = q.size();
	vector<int> p(N);
	rep(i, N) {
		int a = q.front(); q.pop();
		p.at(i) = a;
	}
	rep(i, N) {
		if (a% p.at(i) == 0 && b% p.at(i) == 0) ++count;
	}
	cout << count << endl;
}

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

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b){return *(char*)a - *(char*)b;} /* a,b,c,d.. */
int cmp_str(const void *a, const void *b){return strcmp(*(const char **)a, *(const char **)b);} /* aaa,aab.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)

typedef long long int lli;

lli gcd(lli a, lli b)
{
  lli max = max(a, b);
  lli min = min(a, b);
  
  if (max % min == 0) return min;
  else return gcd(max % min, min);
}

int main(void) {
  lli a, b;
  scanf("%lld %lld", &a, &b);

  lli max = gcd(a, b);

  bool judge;
  lli i, div div2 = 1, ans = 1;
  for (i = 2; i <= max / div2; i++) {
    if (max % i == 0) {
      judge = true;
      div = 2;
      while (div < i) {
        if (i % div == 0) {
          judge = false;
          break;
        }
        div++;
      }
      if(judge) {
        div2 = i;
        ans++;
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:33:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'div2'
   33 |   lli i, div div2 = 1, ans = 1;
      |              ^~~~
main.c:34:26: error: 'div2' undeclared (first use in this function); did you mean 'div'?
   34 |   for (i = 2; i <= max / div2; i++) {
      |                          ^~~~
      |                          div
main.c:34:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:11: error: lvalue required as left operand of assignment
   37 |       div = 2;
      |           ^
main.c:38:18: warning: comparison between pointer and integer
   38 |       while (div < i) {
      |                  ^
main.c:39:15: error: invalid operands to binary % (have 'lli' {aka 'long long int'} and '__attribute__((const)) div_t (*)(int,  int)')
   39 |         if (i % div == 0) {
      |               ^
      |               |
      |               __attribute__((const)) div_t (*)(int,  int)
main.c:43:12: error: lvalue required as increment operand
   43 |         div++;
      |            ^~
main.c:47:9: error: 'ans' undeclared (first use in this function); did you mean 'acs'?
   47 |         ans++;
      |         ^~~
      |         acs
Language: Java

import java.util.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long c = kys(a,b);
        long res = 1;
        res = res + bk(c,1,0);
        System.out.println(res);
    }
    static long kys(long a,long b){
        if(b == 0){return a;}
        return kys(b,a % b);
    }
    static long bk(long c,long j,long plus){
        if(c == 1){return plus;}else{
            if(j == 1){
                if(c % 2 == 0){
                    plus++;
                    return wr(c,2,plus);
                }
            }
            if(j == 2){j = 3;}else{j++;j++;}
            for(long i = j;i<=c;i=i+2){
                if(c % i == 0){
                    plus++;
                    while(c % i == 0){
                        c = c / i;
                    }
                    return bk(c,i,plus);
                }
            }
        }
        return plus;
    }
}


Compiler output:
Main.java:24: error: cannot find symbol
                    return wr(c,2,plus);
                           ^
  symbol:   method wr(long,int,long)
  location: class Main
1 error
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include<map>
#include<queue>
#define rep(i, n) rep2(i,0,n)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using namespace std;

bool IsPrime(int num)
{
	if (num < 2) return false;
	else if (num == 2) return true;
	else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

	// 素数である
	return true;
}

void prime(int n, queue<int> &q) {
	
	rep2(i,2, n) {
		if (IsPrime(i)) q.push(i);
	}
}
int main()
{
	int a, b;
	cin >> a >> b;

	int n = min(a, b);
	queue<int> q;

	prime(n, q);

	int count = 1;

	int N = q.size();
	vector<int> p(N);
	rep(i, N) {
		int a = q.front(); q.pop();
		p.at(i) = a;
	}
	rep(i, N) {
		if (a% p.at(i) == 0 && b% p.at(i) == 0) ++count;
	}
	cout << count << endl;
}

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

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

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

    // 素数である
    return true;
}


int main()
{
  long long a,b;
  cin >> a >> b;
  vector<long long> c;
  if( a >= b )
  {
    for( int i = 1; i <= a; i++ )
    {
      if( a % i == 0 && b % i == 0 )
      {
        c.push_back(i);
      }
    }
  } else {
    for( int i = 1; i <= b; i++ )
    {
      if( a % i == 0 && b % i == 0 )
      {
        c.push_back(i);
      }
    }
  }
  
  long long count;
  for( int i = 0; i < c.size(); i++ )
  {
    if IsPrime(c[i]) count++;
  }
  cout << count << endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:11:22: error: 'sqrt' was not declared in this scope
   11 |     double sqrtNum = sqrt(num);
      |                      ^~~~
a.cc: In function 'int main()':
a.cc:53:8: error: expected '(' before 'IsPrime'
   53 |     if IsPrime(c[i]) count++;
      |        ^~~~~~~
      |        (
Language: C++

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

int int gcd( int m, int n ){
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;
	
	while( m != n )
	{
		if ( m > n ) m = m - n;
		else         n = n - m;
	}
	return m;
}

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;
  int ans = 1;
  for(int i=2;i<=gcd(a,b);i++){
    if(prime(i)){
      if(a%i == 0 && b%i == 0){
        ans++;
      }
    }
  }
  
  cout << ans << endl;
  
  
  return 0;
}


Compiler output:
a.cc:7:1: error: two or more data types in declaration of 'gcd'
    7 | int int gcd( int m, int n ){
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
bool is_prime[10000000000000 + 1];
vector<int> P;
void Eratosthenes(const ll N) {
    for(int i = 0; i <= N; i++) {
        is_prime[i] = true; //初期化
    }
    for(int i = 2; i <= N; i++) {
        if(is_prime[i]) {
            for(int j = 2 * i; j <= N; j += i) {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
}
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    ll A, B;
    cin >> A >> B;
    ll x = gcd(A, B);
    // if(x == 1) {
    //     cout << x << endl;
    //     return 0;
    // }
    ll ans = 1;

    Eratosthenes(x);

    for(const auto &x : P) {
        if(A % x != 0) {
            continue;
        }
        if(B % x != 0) {
            continue;
        }
        ans++;
        // cout << x << " ";
    }

    cout << ans << endl;
}


Compiler output:
/tmp/ccBw5FZL.o: in function `Eratosthenes(long long)':
a.cc:(.text+0xbe): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccBw5FZL.o
/tmp/ccBw5FZL.o: in function `main':
a.cc:(.text+0x140): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccBw5FZL.o
/tmp/ccBw5FZL.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x218): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccBw5FZL.o
a.cc:(.text+0x231): relocation truncated to fit: R_X86_64_PC32 against symbol `P' defined in .bss section in /tmp/ccBw5FZL.o
collect2: error: ld returned 1 exit status
Language: C++

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

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

    // 素数である
    return true;
}

int main() {
  ll A, B; cin >> A >> B;
  queue<int> a;
  queue<int> b;
  queue<int> c;
  queue<int> d;

  for(int i=1; i<A+1; i++){
    
    if(A % i+1 ==0){
    a.push(i+1);
  }
  }
  
  for(int i=1; i<B+1; i++){
    
    if(B % i+1 ==0){
    b.push(i+1);
  }
  }
  
  rep(i,a.size()){
    
    if(IsPrime(a.front())){
      c.push(a.front());
      a.pop();
    }
    a.pop();
  }
  
   rep(i,b.size()){
     
    if(IsPrime(b.front())){
      d.push(b.front());
      b.pop();
    }
     b.pop()
  }
  
  int ans=0;
  vector<int> e(c.size());
  vector<int> f(d.size());
  
  rep(i,c.size()){
    e[i] = c.front();
    c.pop();
  }
  
  rep(i,d.size()){
    f[i] = d.front();
    f.pop();
  }
  
  rep(i,c.size()){
    rep(j,d.size()){
      if(e[i] == f[j]){
        ans++; 
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:13: error: expected ';' before '}' token
   62 |      b.pop()
      |             ^
      |             ;
   63 |   }
      |   ~          
a.cc:76:7: error: 'class std::vector<int>' has no member named 'pop'
   76 |     f.pop();
      |       ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long int gcd(long long int a ,long long  int b){
 lomg long int  r, tmp;
 if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }

  return b;
}

//int v,w; cin>>v>>w;
int main()
{
  long long int v,w,k=0; cin>>v>>w;
	char  c[max(v,w)];
   long long  int   n0,n;   // 整数
   long long  int   ns=2;   // 素因数
   long long  int   j;      // 乗数

   n0=gcd(v,w);

    for( n=n0,ns=2; n>=ns; ns++ )
      {
        for( j=0; n%ns==0; j++ )            // 割り切れる間繰り返す
         {
           n/=ns;
         }

        if ( j==0 ) continue;               // 1回も割り切れなかった

        //printf("素因数:%d  乗数:%d\n",ns,j);
      k++;
     }
  cout<<k+1;
}

Compiler output:
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:4:2: error: 'lomg' was not declared in this scope; did you mean 'long'?
    4 |  lomg long int  r, tmp;
      |  ^~~~
      |  long
a.cc:6:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    6 |     tmp = a;
      |     ^~~
      |     tm
a.cc:10:3: error: 'r' was not declared in this scope
   10 |   r = a % b;
      |   ^
Language: C++

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

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

    // 素数である
    return true;
}

int main() {
  ll A, B; cin >> A >> B;
  queue<int> a;
  queue<int> b;
  queue<int> c;
  queue<int> d;

  for(int i=1; i<A+1; i++){
    
    if(A % i+1 ==0){
    a.push(i+1);
  }
  }
  
  for(int i=1; i<B+1; i++){
    
    if(B % i+1 ==0){
    b.push(i+1);
  }
  }
  
  rep(i,a.size()){
    
    if(IsPrime(a.front())){
      c.push(a.front);
      a.pop();
    }
    a.pop();
  }
  
   rep(i,b.size()){
     
    if(IsPrime(b.front())){
      d.push(b.front());
      b.pop();
    }
     b.pop()
  }
  
  int ans=0;
  vector<int> e(c.size());
  vector<int> f(d.size());
  
  rep(i,c.size()){
    e[i] = c.front();
    c.pop();
  }
  
  rep(i,d.size()){
    f[i] = d.front();
    f.pop();
  }
  
  rep(i,c.size()){
    rep(j,d.size()){
      if(e[i] == f[j]){
        ans++; 
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:13: error: no matching function for call to 'std::queue<int>::push(<unresolved overloaded function type>)'
   50 |       c.push(a.front);
      |       ~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
  283 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:283:30: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::queue<int>::value_type&' {aka 'const int&'}
  283 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
  288 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:288:25: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::queue<int>::value_type&&' {aka 'int&&'}
  288 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
a.cc:62:13: error: expected ';' before '}' token
   62 |      b.pop()
      |             ^
      |             ;
   63 |   }
      |   ~          
a.cc:76:7: error: 'class std::vector<int>' has no member named 'pop'
   76 |     f.pop();
      |       ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll 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(t % i == 0){
			if(isP(i))
				cnt++;
//			if(isP(j))
//				cnt++;
		}		
	}
	printf("%lld\n",cnt);
	return 0;
}\

Compiler output:
a.cc:38:2: error: stray '\' in program
   38 | }\
      |  ^
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]) {
		if(sqrt(max) < index)
		ind = (ind + 1) % 2;
		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:44:20: error: 'sqrt' was not declared in this scope
   44 |                 if(sqrt(max) < index)
      |                    ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <climits>
#include <array>
#define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)

using ll = long long;
using ull = unsigned long long;
constexpr ll mod = 1e9 + 7;
using namespace std;

bool IsPrime(int num)
{
	if (num < 2) return false;
	else if (num == 2) return true;
	else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

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

	// 素数である
	return true;
}

std::vector<int> enum_div(int n)//nの約数を列挙
{
	std::vector<int> ret;
	for (int i = 1; i * i <= n; ++i)
	{
		if (n % i == 0)
		{
			ret.push_back(i);
			if (i != 1 && i * i != n)
			{
				ret.push_back(n / i);
			}
		}
	}
	return ret;
}

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

int main() {

	//int N, M; cin >> N >> M;
	//ll ans = 0;
	//vector<int> prices(N, INT_MIN);
	//rep(i, M) {
	//	int a, b; cin >> a >> b;
	//	rep(j, b) {
	//		int c; cin >> c;
	//		if (prices[c - 1] == INT_MIN) {
	//			prices[c - 1] = a;
	//			ans += a;
	//		}
	//		else if (prices[c - 1] > a) {
	//			ans -= prices[c - 1];
	//			ans += a;
	//		}
	//	}
	//}

	//set<int> s;
	//rep(i, N)s.insert(prices[i]);
	//ll ans = 0;
	//for (auto itr = s.begin(); itr != s.end();) {
	//	if (*itr == INT_MIN) {
	//		cout << -1;
	//		return 0;
	//	}
	//	ans += *itr;
	//	itr++;
	//}

	//int ans = 0;
	//rep(i, N) {
	//	if (prices[i] == INT_MIN) {
	//		cout << -1;
	//		return 0;
	//	}
	//	ans += prices[i];
	//}
	//cout << ans;

	ll A, B; cin >> A >> B;
	ll gcd = getGcd(A, B);
	ll ans = 0;
	for (int i = 1; (ll)i * i <= gcd; ++i)
	{
		if (gcd % i == 0)
		{
			if (IsPrime(i) || i == 1)ans++;
			if (i != 1 && (ll)i * i != gcd)
			{
				if (IsPrime(gcd / i) || i == 1)ans++;
			}
		}
	}

	//for (ll i = 1; i * i <= gcd; i++) {
	//	if (gcd % i == 0) {
	//		if (IsPrime(i) || i == 1)ans++;
	//		if (IsPrime(i) || (gcd / i) == 1)ans++;
	//	}
	//}

	cout << ans;

	return 0;

}

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:22:31: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   22 |         double sqrtNum = std::sqrt(num);
      |                               ^~~~
      |                               sort
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
 //Compiler version g++ 6.3.0

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: lvalue required as left operand of assignment
   26 |                         while(a%i=0){
      |                               ~^~
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long A = sc.nextLong();
        long B = sc.nextLong();

        List<Long> commonDivisor = new ArrayList<>();
        long min = A > B ? B : A;
        for (long i = 1; i <= min; i++) {
            if (A % i == 0 && B % i == 0) {
                commonDivisor.add(i);
            }
        }

        long result = 0;

        for (long x = 0; x < commonDivisor.size(); x++) {
            boolean isOk = true;
            for (long y = 0; y < commonDivisor.size(); y++) {
                if (x == y) {
                    continue;
                }

                if(!tagainiso(commonDivisor.get(x), commonDivisor.get(y))) {
                    isOk = false;
                    break;
                }
            }
            if (isOk) {
                result++;
            }
        }

        System.out.println(result);
    }

    public static boolean tagainiso(long a, long b) {
        long min = a > b ? b : a;

        for (long i = 2; i < min; i++) {
            if (a % i == 0 && b % i == 0) {
                return false;
            }
        }

        return true;
    }
}


Compiler output:
Main.java:30: error: incompatible types: possible lossy conversion from long to int
                if(!tagainiso(commonDivisor.get(x), commonDivisor.get(y))) {
                                                ^
Main.java:30: error: incompatible types: possible lossy conversion from long to int
                if(!tagainiso(commonDivisor.get(x), commonDivisor.get(y))) {
                                                                      ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors