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

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

int GCD(int x, int y){
  if(y == 0)
    return x;
  else
    return GCD(y, x%y);
}


int main(void) {
  int a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  int g = GCD(a, b);
  printf("%d\n", g);
  int arr[(int)sqrt(g)];
  arr[0] = 0;
  arr[1] = 1;
  
  int limit = g;
  int count = 1;
  for(int i = 2; i*i <= g; i++){
    arr[i] = 0;
    while(limit%i == 0){
      limit = limit/i;
      arr[i] = arr[i] +1;;
    }
    count++;
  }

  if(g > 1 && count == 1){
    count++;
  }


  // for(int i = 0; i <= (int)sqrt(g); i++){
  //   printf("i == %d  arr[%d] == %d\n", i, i, arr[i]);
  // }
  printf("%d\n", count);
  return 0;

Compiler output:
main.c: In function 'main':
main.c:42:3: error: expected declaration or statement at end of input
   42 |   return 0;
      |   ^~~~~~
Language: C

int main(void) {
  int a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  int g = GCD(a, b);
  int arr[(int)sqrt(g)];
  arr[0] = 0;
  arr[1] = 1;
  int limit = g;
  int count = 0;
  for(int i = 2; i*i < g; i++){
    arr[i] = 0;
    while(limit%i == 0){
      limit = limit/i;
      arr[i] = arr[i] +1;;
    }
  }

  for(int i = 0; i < (int)sqrt(g); i++){
    if(arr[i] > 0)
      count++;
  }
  printf("%d\n", count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d", &a);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d", &a);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:11: error: implicit declaration of function 'GCD' [-Wimplicit-function-declaration]
    5 |   int g = GCD(a, b);
      |           ^~~
main.c:6:16: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    6 |   int arr[(int)sqrt(g)];
      |                ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | int main(void) {
main.c:6:16: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    6 |   int arr[(int)sqrt(g)];
      |                ^~~~
main.c:6:16: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:23:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   23 |   printf("%d\n", count);
      |   ^~~~~~
main.c:23:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:23:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<bits/stdc++.h>
 
#define REP(i,s,N) for (int i=s;i<(N); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;


ll ans=0;

bool so(ll i){
	bool a;
	if(i<=3){
		a=true;
	}else if(i%2==0 || i%3==0){
		a=false;
	}else{
		for(ll j=5;j<=sqrt(i);i+=6){
			if(i%j==0 || i%(j+2)==0){
				a = false;
				break;
			}
		a = true;
		}
	}
	return a;
}

int main(){
	//【大方針】正の公約数を列挙して、その中で素数である個数を数える
	//
	ll A, B;
	cin >> A >> B;
	vector<ll> yaku;
	minAB = min(A,B);
	
	REP(k,1,minAB){
		if(A%k==0 && B%k==0) yaku.push_back(k);
		
	}	
	
	ll n=0;
	for(auto i:yaku){
		if(so(i) == true) n++;
	}
	ans = n*(n-1)/2;

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: error: 'minAB' was not declared in this scope
   35 |         minAB = min(A,B);
      |         ^~~~~
Language: C++

from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	a,b = map(int,input().split())
	g = gcd([a,b])
	l = factorization(g)
	print(len(l)+1 if len(l) != 1 else 1)

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()


Compiler output:
a.cc:77:15: error: empty character constant
   77 |         out = ''
      |               ^~
a.cc:81:19: error: empty character constant
   81 |         if(out == ''): return '0'
      |                   ^~
a.cc:1:1: error: 'from' does not name a type
    1 | from copy import deepcopy
      | ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll a, b; cin>>a>>b;
	ll g = __gcd(a, b);
	ll ans = 1;
	for(int i=2; i*i<=g; i++){
		if (g%i==0){
			ans++;
			while(g%i==0) g/=i;
		}
	}
	if (g!=1) ans++;
	cout << ans << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'll' was not declared in this scope
    9 |         ll a, b; cin>>a>>b;
      |         ^~
a.cc:9:23: error: 'a' was not declared in this scope
    9 |         ll a, b; cin>>a>>b;
      |                       ^
a.cc:9:26: error: 'b' was not declared in this scope
    9 |         ll a, b; cin>>a>>b;
      |                          ^
a.cc:10:11: error: expected ';' before 'g'
   10 |         ll g = __gcd(a, b);
      |           ^~
      |           ;
a.cc:11:11: error: expected ';' before 'ans'
   11 |         ll ans = 1;
      |           ^~~~
      |           ;
a.cc:12:27: error: 'g' was not declared in this scope
   12 |         for(int i=2; i*i<=g; i++){
      |                           ^
a.cc:14:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                         ans++;
      |                         ^~~
      |                         abs
a.cc:18:13: error: 'g' was not declared in this scope
   18 |         if (g!=1) ans++;
      |             ^
a.cc:18:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         if (g!=1) ans++;
      |                   ^~~
      |                   abs
a.cc:19:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         cout << ans << "\n";
      |                 ^~~
      |                 abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define INF INT_MAX
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
 #define int long long
typedef long long ll;
typedef pair<int, int> P;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a * b / gcd(a, b);};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
template<class T>inline bool chmax(T& a,T b){if(a < b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a > b){a=b;return true;}return false;};



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

  int a, b;
  cin >> a >> b;
  int c = gcd(a, b);
  int ans = 0;
  if(int i = 2; i * i <= c; i++) {
    if(c % i == 0) ans++;
    while(c % i == 0) c /= i;
  }
  if(c != 1) ans++;
  cout << ans + 1 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:27: error: expected ')' before ';' token
   31 |   if(int i = 2; i * i <= c; i++) {
      |     ~                     ^
      |                           )
a.cc:31:29: error: 'i' was not declared in this scope
   31 |   if(int i = 2; i * i <= c; i++) {
      |                             ^
Language: C++

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

typedef long long ll

int main(){
  ll a,b;
  cin >> a >> b;
  
  int ret = 1;
  for(ll i = 2;i*i <= min(a,b);i++){
    if(a%i == 0 && b%i == 0)ret++;
    while(a%i == 0)a /= i;
    while(b%i == 0)b /= i;
  }
  if(a > 1 && b > 1){
  	if(b % a == 0 || a % b == 0)ret++;
  }
  
  cout << ret << endl;
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main(){
      | ^~~
Language: C++

#include <iostream>
#include <vector>
int main()
{
	int A = 0, B = 0, ans  =0;

	std::cin >> A >> B;

	std::vector<int> C;

	// 順序固定：A>Bにする
	if (A < B)
	{
		int a = A;
		A = B;
		B = a;
	}

	for (int i = 1; i <= B; i++)
	{
		if ((A % i == 0) && (B % i == 0))
		{
			C.push_back(i);
		}
	}
		
	ans = 1;
	int num = C[C.size() -1];
	int sq = sqrt(num);
	for (int a = 2; sq + 2 > a; a++)
	{
		if (num % a == 0)
		{
			while (num % a == 0)
			{
				num /= a;
			}
			ans++;
		}
	}
	if (num > 1){
		ans++;
	}

	std::cout <<  ans << std::endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   29 |         int sq = sqrt(num);
      |                  ^~~~
      |                  sq
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	bool ip(int n);
	long long a,b,c,i,sum=0;
	cin>>a>>b;
	c=__gcd(a,b);
	for(i=1;i*i<=max(a,b);i++)
	if(ip(i) && c%i==0)sum++;
	cout<<sum+1;
	return 0;
}
bool ip(long long n){
	if(n==0 || n==1)return false;
	long long i;
	for(i=2;i*i<=n;i++)
	if(n%i==0)return false;
	return true;
}

Compiler output:
/usr/bin/ld: /tmp/cc9o9a9Q.o: in function `main':
a.cc:(.text+0x61): undefined reference to `ip(int)'
collect2: error: ld returned 1 exit status
Language: C++

#include<stdio.h>

int main(){
  bool x[1000000000000] = true;
  int tx;
  int A,B,i,j,max;
  scanf("%d%d",&A,&B);
  if(A>B){
    i = A;
    A = B;
    B = i;
  }
  tx = 1;
  for(i=2;i<=B/2;i++){
    if(!x[i]) continue;
   	if(A%i == 0 && B%i == 0){
       tx++;
       for(j=i*2,j<B/2,j += i){
         x[j] = false;
       }
     }  
  }
  printf("%d",tx);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:27: error: array must be initialized with a brace-enclosed initializer
    4 |   bool x[1000000000000] = true;
      |                           ^~~~
a.cc:18:30: error: expected ';' before ')' token
   18 |        for(j=i*2,j<B/2,j += i){
      |                              ^
      |                              ;
a.cc:21:6: error: expected primary-expression before '}' token
   21 |      }
      |      ^
a.cc:20:9: error: expected ';' before '}' token
   20 |        }
      |         ^
      |         ;
   21 |      }
      |      ~   
a.cc:21:6: error: expected primary-expression before '}' token
   21 |      }
      |      ^
a.cc:20:9: error: expected ')' before '}' token
   20 |        }
      |         ^
      |         )
   21 |      }
      |      ~   
a.cc:18:11: note: to match this '('
   18 |        for(j=i*2,j<B/2,j += i){
      |           ^
a.cc:21:6: error: expected primary-expression before '}' token
   21 |      }
      |      ^
Language: Java

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

		int num1 = sc.nextInt();
		int num2 = sc.nextInt();

		List<Integer> num1Divisor = new ArrayList<>();
		List<Integer> num2Divisor = new ArrayList<>();
		List<Integer> commonDivisor = new ArrayList<>();

		for(int i = 1;i <= num1; i++) {
			if(num1 % i == 0) {
				num1Divisor.add(i);
			}
		}

		for(int i = 1;i <= num2; i++) {
			if(num2 % i == 0) {
				num2Divisor.add(i);
			}
		}

		for (Integer num : num1Divisor) {
			if(num2Divisor.contains(num)) {

				commonDivisor.add(num);
				for(int i = 2;i<num;i++) {
					if(num % i == 0)
						commonDivisor.remove(num);
				}

			}
		}

		System.out.println(commonDivisor.size());
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define debug(x) cout << " >> " << #x << " "<<x<<endl;
set<int> s;
void Divisors(int a)
{
    for(int i=1;i*i <= a;i++)
    {
        if(a % i == 0)
        {
            s.insert(i);

            if(i * i != a)
                s.insert(a / i);
        }
    }
}
void Solve_Case()
{
    int A,B;
    cin >> A >> B;
    Divisors(A); Divisors(B);
    vector<int> v(s.begin(),s.end());
    int ans = 0 ;
    for(int i=0;i<v.size();i++)
    {
        for(int j=i+1;j<v.size();j++)
           {
               int a =  __ gcd(v[i],v[j]);
           if( a ==  1)
            ans++;
           }
    }
    cout << ans;
}
signed main()
{
    int TestCases=1;
   // cin >> TestCases;
    while(TestCases--)
    {
        Solve_Case();
    }
	return 0;
}


Compiler output:
a.cc: In function 'void Solve_Case()':
a.cc:30:25: error: '__' was not declared in this scope
   30 |                int a =  __ gcd(v[i],v[j]);
      |                         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef pair<int,int> ii;
#define inf 1e9
#define F first
#define S second
#define dbg(x) cout<<#x<<" value : "<<x<<"\n";
#define rep(i,j,k) for(int i = (j); i <= (k); i++)
#define rep__(i,j,k) for(int i = (j); i < (k); i++)
#define per(i,j,k) for(int i = (j); i >= (k); i--)
#define per__(i,j,k) for(int i = (j); i > (k); i--)
#define mst(a,b) memset(a,b,sizeof(a))
#define sf(n) scanf("%d",&n)
#define stf(n,m) scanf("%d%d",&n,&m)
#define pf(n) printf("%d\n",n)
#define sllf(n) scanf("%lld",&n)
#define pllf(n) printf("%lld\n",n)
priority_queue<int,vector<int>,greater<int> > q;
const int N=1e5+10;
const int mod=1e9+7;
LL n,m,sum=1;

int main()
{
	cin>>n>>m;
	LL x=__gcd(n,m);
	for(LL i=2;i*i<=g;i++){
		if(g%i=0){
			sum++;
			while(g%i==0){
				g/=i;
				if(g==1)break;
			}
		}
	}
	if(g>1)sum++;
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: 'g' was not declared in this scope
   29 |         for(LL i=2;i*i<=g;i++){
      |                         ^
a.cc:38:12: error: 'g' was not declared in this scope
   38 |         if(g>1)sum++;
      |            ^
Language: C

#include　<stdio.h>
int main()
{
	int A,B,a,b,c;
  int data[10000000000000]
  scanf("%d%d",&A,&B);
  for(int i=1;i<=A;i++)
  {
    if(A%i==0)　a++;
  
    for(int j=1;j<=B;j++)
    {
      if(B%j==0)  b++;
    }
    if(A%i==0 && B%i==0)   c++;
    
    printf("%d",a+b-c);
}	

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include　<stdio.h>
      |         ^~
main.c: In function 'main':
main.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |   scanf("%d%d",&A,&B);
      |   ^~~~~
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include　<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d%d",&A,&B);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:15: error: stray '\343' in program
    9 |     if(A%i==0)<U+3000>a++;
      |               ^~~~~~~~
main.c:17:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |     printf("%d",a+b-c);
      |     ^~~~~~
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include　<stdio.h>
int main()
{
	int A,B、a,b,c;
  int data[10000000000000]
  scanf("%d%d",&A,&B);
  for(int i=1;i<=A;i++)
  {
    if(A%i==0)　a++;
  
    for(int j=1;j<=B;j++)
    {
      if(B%j==0)  b++;
    }
    if(A%i==0 && B%i==0)   c++;
    
    printf("%d",a+b-c);
}	

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include　<stdio.h>
      |         ^~
main.c: In function 'main':
main.c:4:16: error: stray '\343' in program
    4 |         int A,B<U+3001>a,b,c;
      |                ^~~~~~~~
main.c:4:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
    4 |         int A,B、a,b,c;
      |                  ^
main.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |   scanf("%d%d",&A,&B);
      |   ^~~~~
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include　<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d%d",&A,&B);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:20: error: 'B' undeclared (first use in this function)
    6 |   scanf("%d%d",&A,&B);
      |                    ^
main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:15: error: stray '\343' in program
    9 |     if(A%i==0)<U+3000>a++;
      |               ^~~~~~~~
main.c:9:17: error: 'a' undeclared (first use in this function)
    9 |     if(A%i==0)　a++;
      |                 ^
main.c:13:19: error: 'b' undeclared (first use in this function)
   13 |       if(B%j==0)  b++;
      |                   ^
main.c:15:28: error: 'c' undeclared (first use in this function)
   15 |     if(A%i==0 && B%i==0)   c++;
      |                            ^
main.c:17:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |     printf("%d",a+b-c);
      |     ^~~~~~
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
long long int m,n,a,b;
vector<int> av;
int bj[120000],de[110000];
int x=0,y=0;
int main()
{
	for(long long x=2;x<110000;x++)
	{
		if(bj[x]==0)
		{
			for(long long y=x*x;y<110000;y+=x)
			{
				bj[y]=1;
			}
		}
	}
	cin>>a>>b;
	n=__gcd(a,b);
	av.push_back(1);
	for(int x=2;x*x<=n;x++)
	{
	if(n%x==0)
	{
		while(n%x==0)
		{
			n/=x;
		}
		av.push_back(x);
	}	
	}
	if(n!=1)
	{
		av.push_back(n);
	}
		cout<<av.size()<<endl;
}

Compiler output:
a.cc:7:1: error: 'vector' does not name a type
    7 | vector<int> av;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:24:9: error: 'av' was not declared in this scope; did you mean 'a'?
   24 |         av.push_back(1);
      |         ^~
      |         a
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
long long int m,n,a,b;
vector<int> av;
int bj[120000],de[110000];
int x=0,y=0;
int main()
{
	for(long long x=2;x<110000;x++)
	{
		if(bj[x]==0)
		{
			for(long long y=x*x;y<110000;y+=x)
			{
				bj[y]=1;
			}
		}
	}
	cin>>a>>b;
	n=__gcd(a,b);
	av.push_back(1);
	for(int x=2;x*x<=n;x++)
	{
	if(n%x==0)
	{int y=n/x;
	if(bj[x]==0)
	{
		while(n%x==0)
		{
			n/=x;
		}
		av.push_back(x);
	}
	if(bj[y]==0&&y!=1)
	{
		while(n%y==0)
		{
			n/=y;
		}
		av.push_back(y);
	}
	}
	}
	if(av.size()==1&&n!=1)
	{
		av.push_back(n);
	}
		cout<<av.size()<<endl;
}


Compiler output:
a.cc:7:1: error: 'vector' does not name a type
    7 | vector<int> av;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:24:9: error: 'av' was not declared in this scope; did you mean 'a'?
   24 |         av.push_back(1);
      |         ^~
      |         a
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { std::cout << #a << " = " << a << "\n"; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
template<class T, class V> istream& operator>> (istream& ist, pair<T, V>& p) { return ist >> p.first >> p.second; }
template<class T> ostream& operator<< (ostream& ost, pair<T, T>& p) { return ost << p.first << ", " << p.second; }
template<class T> istream& operator>> (istream& ist, vector<T>& vs) { for(auto& e: vs) ist >> e; return ist; }

typedef long long ll;
int const inf = INT_MAX / 2;

int main() {
  std::gcd(1, 2);
  test;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'test' was not declared in this scope
   22 |   test;
      |   ^~~~
Language: C++

#include"bits/stdc++.h"
#include"math.h"
using namespace std; 
#define rep(i,n) for( int i=0; i<n;i++)
typedef long long ll;
int main(){
  int a,b;
  cin>>a>>b;
  if(a==1){
    cout << 1 << endl;}
  else{
    
  int x=2;
  int f=d%e;
  vector<int> s(0);
    s.push_back(0);
                s.push_back(1);
  while(f>0){
    a=b;
    b=f;
    f=a%f;}
 
  while(e>1){
  if(e%x==0){
    s.push_back(x);
    e/=x;
  }
    else x++;}
int count =0;
  
for(int i=0;i<s.size()-1;i++){if(s[i]==s[i+1]){
  count ++;}}
  cout << s.size() - count-1 << endl;}}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'd' was not declared in this scope
   14 |   int f=d%e;
      |         ^
a.cc:14:11: error: 'e' was not declared in this scope
   14 |   int f=d%e;
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define all(a) a.begin(),a.end()
#define F first
#define S second
#define pb push_back
#define ll long long
#define ld long double
#define mkp make_pair
#define sz(x) (int)x.size()
#define pi pair<long long, long long>
#define watch(x) cout << (#x) << " is " << (x) << endl; cout.flush()
#define endl '\n'
#define _ << ' '
#define FAST_LOG2(x) (sizeof(unsigned long)*8 - 1 - __builtin_clzl((unsigned long)(x)))
#define clog2(x) (((x) - (1 << FAST_LOG2(x))) ? FAST_LOG2(x) + 1 : FAST_LOG2(x))
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> idxset;
//find_by_order(i) : iterator to the value at index i, order_of_key(x) : the index of value x
const ll mod = (ll)1e9+7;
const ll INF = (ll)1e9+1;

bool p(ll x){
    for(int i=2; i<=sqrt(x); i++){
        if(x%i==0) return 0;
    }
    return 1;
}
ll a, b, ans=0;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    #ifndef ONLINE_JUDGE
   // freopen("B.txt", "r", stdin);
    #endif
    cin >> a >> b;
    for(ll i=1; i*i<=min(a, b); i++){
        if(a%i==0&&b%i==0){
            if(p(i)) ans++;
            ll c = a/i;
            if(b%c==0&&i!=c&&p(c) ans++;
        }
    }
    cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:34: error: expected ';' before 'ans'
   44 |             if(b%c==0&&i!=c&&p(c) ans++;
      |                                  ^~~~
      |                                  ;
a.cc:45:9: error: expected primary-expression before '}' token
   45 |         }
      |         ^
a.cc:44:41: error: expected ')' before '}' token
   44 |             if(b%c==0&&i!=c&&p(c) ans++;
      |               ~                         ^
      |                                         )
   45 |         }
      |         ~                                
a.cc:45:9: error: expected primary-expression before '}' token
   45 |         }
      |         ^
Language: C++

#define _LIBCPP_DEBUG 0
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1e9+7;

int main(void) {

    ll A,B; cin>>A>>B;
    ll Gcd = __gcd(A,B);

    ll ans = 1;
    for (ll i = 2; i*i <= Gcd; ++i) {
        if(Gcd % i == 0){
            ans++;
            while(Gcd % i == 0){
                Gcd /= i;
            }
        }
    }
    if(Gcd)!=1){
        ans++;
    }
    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected primary-expression before '!=' token
   21 |     if(Gcd)!=1){
      |            ^~
Language: C++

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

int gcd(int a, int b){
	return !b:a?gcd(b,a%b);
}
int32_t main() {
	int a,b;
	cin>>a>>b;
	int g = gcd(a,b);
	int ans=0;
	for(int i=2;i*i<=g;i++){
		if(g%i !=0) continue;
		ans++;
		do g /= i; while(g%i == 0);
	}
	if(g>1) ans++;
	cout<<ans;<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:6:18: error: found ':' in nested-name-specifier, expected '::'
    6 |         return !b:a?gcd(b,a%b);
      |                  ^
      |                  ::
a.cc:6:17: error: 'b' is not a class, namespace, or enumeration
    6 |         return !b:a?gcd(b,a%b);
      |                 ^
a.cc:6:31: error: expected ':' before ';' token
    6 |         return !b:a?gcd(b,a%b);
      |                               ^
      |                               :
a.cc:6:31: error: expected primary-expression before ';' token
a.cc: In function 'int32_t main()':
a.cc:19:19: error: expected primary-expression before '<<' token
   19 |         cout<<ans;<<endl;
      |                   ^~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> ordered_set;

#define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0)
char _;
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define all(a) a.begin(),a.end()
#define println printf("\n");
#define readln(x) getline(cin,x);
#define pb push_back
#define endl "\n"
#define INT_INF 0x3f3f3f3f
#define LL_INF 0x3f3f3f3f3f3f3f3f
#define MOD 1000000007
#define MOD2 1494318097
#define SEED 131
#define mp make_pair
#define fastio cin.tie(0); cin.sync_with_stdio(0);

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef unordered_map<int,int> umii;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef pair<int,pii> triple;
typedef int8_t byte;

mt19937 g1(time(0));

int randint(int a, int b){return uniform_int_distribution<int>(a, b)(g1);}
ull randlong(ull a,ull b){return uniform_int_distribution<unsigned long long>(a, b)(g1);}

ll gcd(ll a, ll b){return b == 0 ? a : gcd(b, a % b);}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
//ll fpow(ll  b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}

//ll fmul(ll a, ll b, ll mod){ll res=0;while(a){if(a&1)res=(res+b)%mod;a>>=1;b=(b<<1)%mod;}return res;}
//ll fpowfast(ll b, ll exp, ll mod){ll res=1;while(exp){if(exp&1)res=fmul(res,b,mod);b=fmul(b,b,mod);exp>>=1;}return res;}
//inline bool rabbin_miller(ll x){if(x%2==0) return false;for(int i=0;i<5;i++){ll rd=randlong(2,x-2);if(fpowfast(rd,x-1,x)!=1)return false;}return true;}

ll A,B,res=1;

ull fmul(ull a, ull b, ull mod){
	ull res = 0;
	while(a){
		if(a&1) res = (res+b)%mod;
		a>>=1;
		b = (b<<1)%mod;
	}
	return res;
}

ull fpow(ull b, ull exp, ull mod){
	ull res = 1;
	while(exp){
		if(exp&1) res = fmul(res,b,mod);
		b = fmul(b,b,mod);
		exp>>=1;
	}
	return res;
}

inline bool prim(ull x){
	if(x == 2 || x == 3) return true;
//	if(x%2 == 0) return false;
	for(int i=0; i<30; i++){
		ull rd = randlong(2,x-2);
		if(fpow(rd,x-1,x) != 1)
			return false;
	}
	return true;
}

int main(){
	scanf("%lld %lld",&A,&B);
	ull gg = __gcd(A,B);
	for(ull i=2; i<=sqrt(gg); i++){
		if(gg%i == 0){
			if(prim(i))
				res++;
			if(i*i != gg && prim(gg/i))
				res++;
		}
	}
	printf("%lld\n",res);
}

Compiler output:
a.cc: In function 'll divmod(ll, ll, ll)':
a.cc:43:54: error: 'fpow' was not declared in this scope; did you mean 'pow'?
   43 | ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
      |                                                      ^~~~
      |                                                      pow
Language: C++

#include <iostream>
using namespace std;
unsigned int gcd(unsigned int A, unsigned int B){
  unsigned int a, b;
  if(A < B){
    a = B;
    b = A;
  } else {
    a = A;
    b = B;
  }
  unsigned int r;
  while(r>0){
    r = a % b;
    a = b;
    b = r;
  }
  return b;
}

int main(){
  unsigned int A, B;
  cin >> A >> B;
  unsigned int max = gcd(A, B);
  cout << max << endl;
  unsigned int a = 2, cnt = 1, tmp=0;
  while(max >= a*a){
    if(max % a == 0){
      n /= a;
      if(a != tmp){
        cnt++;
        tmp = a;
      }
    }else{
      a++;
    }
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: 'n' was not declared in this scope
   29 |       n /= a;
      |       ^
Language: C

        printf("%dは素数だ\n",i);
        p[count]=i;
        for(int k=0;k<count;k++){
            printf("%d番目の素数は %d\n",k+1,p[k]);    
        }        
        count++;
        check =1;

Compiler output:
main.c:1:16: error: expected declaration specifiers or '...' before string constant
    1 |         printf("%dは素数だ\n",i);
      |                ^~~~~~~~~~~~~~
main.c:1:31: error: unknown type name 'i'
    1 |         printf("%dは素数だ\n",i);
      |                               ^
main.c:2:11: error: 'count' undeclared here (not in a function)
    2 |         p[count]=i;
      |           ^~~~~
main.c:2:9: warning: data definition has no type or storage class
    2 |         p[count]=i;
      |         ^
main.c:2:9: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c:2:18: error: 'i' undeclared here (not in a function)
    2 |         p[count]=i;
      |                  ^
main.c:3:9: error: expected identifier or '(' before 'for'
    3 |         for(int k=0;k<count;k++){
      |         ^~~
main.c:3:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 |         for(int k=0;k<count;k++){
      |                      ^
main.c:3:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 |         for(int k=0;k<count;k++){
      |                              ^~
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    6 |         count++;
      |              ^~
main.c:7:9: warning: data definition has no type or storage class
    7 |         check =1;
      |         ^~~~~
main.c:7:9: error: type defaults to 'int' in declaration of 'check' [-Wimplicit-int]
Language: C

#include <stdio.h>

int main(void) {
	long int A,B,tmp;
	lomg int i,s,j;
	scanf("%ld %ld",&A,&B);
	long int N[tmp];
	tmp=A;
	if(A<B){
		tmp=B;
	}
	s=0;
	for(i=0;i<tmp;i++){
		if(A%i==0&&B%i==0){
			N[s]=i;
			s++
		}
	}
	int k,count,ans;
	k=N[s];
	count=0;
	for(i=0;i<s;i++){
		for(j=1;j<k;j++){
			if(N[i]%j!=0){
				count++;
			}
		}
		if(count==1){
			ans++;
		}
	}
	printf("%d",ans);
	
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'lomg' undeclared (first use in this function)
    5 |         lomg int i,s,j;
      |         ^~~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:13: error: expected ';' before 'int'
    5 |         lomg int i,s,j;
      |             ^~~~
      |             ;
main.c:12:9: error: 's' undeclared (first use in this function)
   12 |         s=0;
      |         ^
main.c:13:13: error: 'i' undeclared (first use in this function)
   13 |         for(i=0;i<tmp;i++){
      |             ^
main.c:16:28: error: expected ';' before '}' token
   16 |                         s++
      |                            ^
      |                            ;
   17 |                 }
      |                 ~           
main.c:23:21: error: 'j' undeclared (first use in this function)
   23 |                 for(j=1;j<k;j++){
      |                     ^
Language: Java

package ABC.case142;

import java.util.Scanner;

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

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = gcd(a, b);

        int count = 1;

        for (int i = 2; i*i <= c; i++) {
            if (c%i != 0) {
                continue;
            }
            while (c%i ==0) {
                c /= i;
            }
            count++;
        }

        if (c > 1) {
            count++;
        }
        System.out.println(count);
    }

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

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

#include <stdio.h>

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

int main() {
	long long int A, B, G_Common;
	scanf("%lld %lld",&A,&B);
	//G_Common = gcd(A,B);
	int k;
	while ((k = A%b) > 0) {
		A = B;
		B = K;
	}

	G_Common = B;
	long long int tmp = G_Common;
	int cnt = 1, i, j;
	for (i = 2; G_Common > 1 && G_Common >= i*i; ) {
		for (j = 0; G_Common % i == 0; j++) G_Common /= i;
		if (j > 0) cnt++;
		if (i == 2) i++;
		else i += 2;
	}
	if (G_Common >= i) cnt++;
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:23: error: 'b' undeclared (first use in this function)
   13 |         while ((k = A%b) > 0) {
      |                       ^
main.c:13:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:21: error: 'K' undeclared (first use in this function)
   15 |                 B = K;
      |                     ^
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc=new Scanner(System.in);
        long a=sc.nextLong();
      	long b=sc.nextLong();
    	long c=gcd(a,b);
      int d=0;
      
      for(int i=2; i*i<=c;i++){
        if(c%i!=0){continue;}
      	while(c%i==0){
        	c=c/i;
        }
        d++;
      }
      if(c>1){d++;}
      System.out.println((d+1));
        
    }
  	
  	public static long gcd(long a, long b){
    	while(b%a!=0){
        	long c=b%a;
          	b=a;
          	a=c;
        }
      return a;
    }
  

Compiler output:
Main.java:29: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a >> b;
      |         ^~~
a.cc:5:11: error: '__gcd' was not declared in this scope
    5 |         a=__gcd(a,b);
      |           ^~~~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << ans+1 << endl;
      |         ^~~~
a.cc:13:26: error: 'endl' was not declared in this scope
   13 |         cout << ans+1 << endl;
      |                          ^~~~
Language: C

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

int main(){
  int A,B,N,count,M,L;
  cin>>A>>B;
  vector<int> vec,ans;
  if(A-B>=0) N=B;
  else N=A;
  for(int i=1;i<N+1;i++){
    if(A%i==0 && B%i==0){
      vec.push_back(i);
    }
    if(i*i>N){
      break;
    }
  }
  L=vec.size();
  for(int i=0;i<L;i++){
    count=0;
    for(int j=0;j<L;j++){
      if(vec.at(i)%vec.at(j)==0){
        count++;
      }
    }
    if(count==2){
      ans.push_back(vec.at(i));
    }
  }
  reverse(ans.begin(),ans.end());
  cout<<ans.at(0)<<endl;
  return 0;
}

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

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <map>
#include <cstring>
#include <string>
using namespace std;

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

int main()
{
	long long a, b, ans = 1;

	cin >> a >> b;
	long long c = gcd(a, b);
	long long d = c;

	for (long long i = 2; i <= sqrt(d); i++)
	{
		if (c%i == 0)
		{
			ans++;
			while (c%i == 0)
				c /= i;
		}
		else
			continue;
	}

	if (c != 1)
		ans++;
	cout << ans;
}

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

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

ll gcd(ll x,ll y){
  if(y==0){
    return x;
  }else{
    return gcd(y,x%y);
  }
}

vector<pair<ll,int>> factorize(ll n){
  vector<pair<ll,int>> res;
  for(ll i=2;i*i<=n;i++){
    if(n/i!=0){
      continue;
    }
    res.emplace_back(i,0);
    while(n%i==0){
      n/=i;
      res.back().second++;
    }
    if(n!=1){
      res.emplace_back(n,1);
    }
  }
  return res;
}
 
      
  
}
int main(){
  ll a,b;
  cin>>a>>b;
  ll g=gcd(a,b);
  auto f=factorize(g);
  int ans=f.size();
  cout<<ans<<endl;
}

Compiler output:
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

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

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

    int64_t z = gcd(a,b);
    int ans = 1;

    int64_t div = 2;
    while(z>1) {
        if(z%div == 0) {
            while(z%div==0) {
                z = z/div;
            }
            ans++;
        } 
        div++;
    }
    cout<<ans<<endl;

}


int64_t gcd(int64_t a, int64_t b) {
    if(a>b) {
        int64_t c = a;
        a = b;
        b = c;
    }

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

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

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


int64_t is_prime(int64_t);
int64_t gcd(int64_t, int64_t);
int main() {
    int64_t a,b;
    cin>>a>>b;

    int64_t z = gcd(a,b);
    int ans = 1;
    for(int i=2; i<=z; i++) {
        if(is_prime(i)==1 && z%i==0) ans++;
    }
    cout<<ans<<endl;
}

int64_t is_prime(int64_t p) {
    if(p==2) return 1;
    else {
        for(int64_t i=2; i<p; i++) {
            if(p%i==0) return 0;
        }
    }
    return 1;
}

int64_t gcd(int64_t a, int64_t b) {
    if(a>b) {
        int64_t c = a;
        a = b;
        b = c;
    }

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

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

import java.util.Scanner;

class Main {
  static public void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextlong();
    long B = sc.nextlong();
    long gcd = gcd(A, B);
    int counter = 1;
    for(int i = 2; i < Math.max(A, B); i++) {
      if(gcd % i == 0) {
        counter++;
      }
      while(gcd % i == 0) {
        gcd /= i;
      }
    }
    System.out.println(counter);
    return;
  }

  private static long gcd(long m, long n) {
    if(m < n) {
      return gcd(n, m);
    }
    if(n == 0) {
      return m;
    }
    return gcd(n, m % n);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    long A = sc.nextlong();
               ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
Main.java:7: error: cannot find symbol
    long B = sc.nextlong();
               ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
2 errors
Language: C++

#include<bits/stdc++.h>

using namespace std;

long long f(long long a, long long b) {
    return !b?a:f(b,a%b);
}

bool isPrime(long long i) {
    for (long long ii=2; ii*ii<=i; ii++) {
        if (i%ii==0) return 0;
    }
    return 1;
}

int main() {
    long long a, b, cnt=0;
    scanf("%lld%lld",&a,&b);
    long long c=a>b?f(a,b):f(b,a);
    if (c==1) { printf("1"); return 0; }
    for (long long i=1; i*i<=c; i++) {
        if (isPrime(i) && c%i==0) {
            ++cnt;
            if (isPrime(c/i) && i!=c/i) ++cnt;
        }
    }
    printf("%lld",cnt);
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: expected '}' at end of input
   28 |     return 0;
      |              ^
a.cc:16:12: note: to match this '{'
   16 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
#define ll long long

int main() {
  ll A,B;
  cin >> A >> B;
  std::vector<ll> avec;
  ll retval=0;
  ll na = A;
  ll nb = B;
  ll val = A;
  ll retval = 0;
  while (val > 1) {
    val = __gcd(na,nb);
    retval += 1;
    na/=val;
    nb/=val;
  }
  cout << retval << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: redeclaration of 'long long int retval'
   15 |   ll retval = 0;
      |      ^~~~~~
a.cc:11:6: note: 'long long int retval' previously declared here
   11 |   ll retval=0;
      |      ^~~~~~
a.cc:17:11: error: '__gcd' was not declared in this scope
   17 |     val = __gcd(na,nb);
      |           ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
#define ll long long

int main() {
  ll A,B;
  cin >> A >> B;
  std::vector<ll> avec;
  ll retval=0;
  ll na = A;
  for (int i = 2; i<=A; ++i) {
    if (na%i==0) avec.push_back(i);
    while (na%i==0) na/=i;
    if (na < i) break;
  }
  //avec.push_back(A);
  for (int j = 0; j<avec.size(); ++j)
    if (B%avec[j]==0) retval+=1;
  }
  cout << retval+1 << endl;
}


Compiler output:
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout << retval+1 << endl;
      |   ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

int main() {
  ll A,B;
  cin >> A >> B;
  std::vector<ll> avec;
  ll retval=0;
  ll na = A;
  ll gcd = __gcd(a,b);
  for (int i = 2; i<=asqrt+1; ++i) {
    if (na%i==0) avec.push_back(i);
    while (na%i==0) na/=i;
  }
  avec.push_back(A);
  for (int j = 0; j<avec.size(); ++j)
    if (B%avec[j]==0) retval+=1;
  }
  cout << retval+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'a' was not declared in this scope
   14 |   ll gcd = __gcd(a,b);
      |                  ^
a.cc:14:20: error: 'b' was not declared in this scope
   14 |   ll gcd = __gcd(a,b);
      |                    ^
a.cc:15:22: error: 'asqrt' was not declared in this scope; did you mean 'sqrt'?
   15 |   for (int i = 2; i<=asqrt+1; ++i) {
      |                      ^~~~~
      |                      sqrt
a.cc: At global scope:
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout << retval+1 << endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
#define ll long long

int main() {
  ll A,B;
  cin >> A >> B;
  std::vector<ll> avec;
  ll retval=0;
  ll na = A;
  //std::floor(std::sqrt(A));
  ll asqrt = std::floor(A/2)
  if (asqrt >= 1) {
    for (int i = 2; i<=asqrt+1; ++i) {
      if (na%i==0) avec.push_back(i);
      while (na%i==0) na/=i;
    }
    avec.push_back(A);
    for (int j = 0; j<avec.size(); ++j)
      if (B%avec[j]==0) retval+=1;
  }
  cout << retval+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected ',' or ';' before 'if'
   15 |   if (asqrt >= 1) {
      |   ^~