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

#include <stdio.h>
int main(void){
  int A,B,K,i,j=1;x[100];
  scanf("%d",&A);
  scanf("%d",&B);
  scanf("%d",&K);
  for(i=1;i<=100;i++){
    if(A%i=0){
      if(B%i=0){
        x[j]=i;
        j=j+1;}
      else{}
    }
    else{}
  }
  printf("%d",x[K]):
  return 0;
}
      

Compiler output:
main.c: In function 'main':
main.c:3:19: error: 'x' undeclared (first use in this function)
    3 |   int A,B,K,i,j=1;x[100];
      |                   ^
main.c:3:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:11: error: lvalue required as left operand of assignment
    8 |     if(A%i=0){
      |           ^
main.c:9:13: error: lvalue required as left operand of assignment
    9 |       if(B%i=0){
      |             ^
main.c:16:20: error: expected ';' before ':' token
   16 |   printf("%d",x[K]):
      |                    ^
      |                    ;
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a, b, k, count;
    int n[100];
    cin >> a >> b >> k;

    count = 0;

    for(int i = 0; i < a; i++){
        if(a % i == 0 && b % i == 0) {
            n[count] = i;
            count++
        }
    }

    cout << n[k] << endl;
}


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

#include"bits/stdc++.h"

using namespace std;

template<typename T>
void remove(vector<T>& vector)
{
	vector.erase(vector.begin());
}

int main() {
	int A, B, K;
	cin >> A >> B >> K;
	vector<int> K2(101);
	remove(K2, 0);
	for (int i = 1; i < 100; i++) {
		
		if (A%i == 0 && B%i == 0) {
			K2.push_back(i);
		}
	}

	sort(K2.rbegin(), K2.rend());

	for (int i = 0; i < 100; i++) {
		if(i==K-1){
			cout << K2[i] << endl;
			break;
		}
	}
	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: no matching function for call to 'remove(std::vector<int>&, int)'
   15 |         remove(K2, 0);
      |         ~~~~~~^~~~~~~
a.cc:6:6: note: candidate: 'template<class T> void remove(std::vector<_Tp>&)'
    6 | void remove(vector<T>& vector)
      |      ^~~~~~
a.cc:6:6: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:788:5: note: candidate: 'template<class _FIter, class _Tp> _FIter std::remove(_FIter, _FIter, const _Tp&)'
  788 |     remove(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h:788:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::remove(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  224 | remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note:   candidate expects 4 arguments, 2 provided
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/stdio.h:158:12: note: candidate: 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |            ^~~~~~
/usr/include/stdio.h:158:12: note:   candidate expects 1 argument, 2 provided
Language: C++

#include<iostream>
using namespace std;
int a,b,c,sum=0;
int main(){
	scanf("%d %d %d",&a,&b,&c);
  	for(int i=min(a,b);i>=1;i--){
      if（a%i==0&& b%i==0）
      	sum++;
    if(sum==c)
      printf("%d\n",i);
      return 0;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'if\U0000ff08a' was not declared in this scope
    7 |       if（a%i==0&& b%i==0）
      |       ^~~~~
a.cc:7:25: error: unable to find numeric literal operator 'operator""\U0000ff09'
    7 |       if（a%i==0&& b%i==0）
      |                         ^~~
Language: C

#include<stdio.h>

int main(void)
{
 int ok[100];
 int ka[100];
 int ao[100];
 int aw[100];
 int a,b,k;
 scanf("%d",&a);
 scanf("%d",&b);
 scanf("%d",&k);
 for(int i=0;i<100;i++){
   int s=1;
   ok[i]=s;
    if(a%ok[i]==0){
     int f=0;
     ka[f]=ok[i];
     ++f;
      }
    if(b%ok[i]==0){
     int f=0;
     ao[f]=ok[i];
     ++f;
     }
   ++s;
 for(int f=0;f<100;f++){
   if(ok[f]==ao[f]){
     int c=0;
     aw[c]=ao[f];
     ++c;
  }
printf("%d",aw[k]);
return 0;
 }

Compiler output:
main.c: In function 'main':
main.c:35:2: error: expected declaration or statement at end of input
   35 |  }
      |  ^
main.c:35:2: error: expected declaration or statement at end of input
Language: C++

        #include <iostream>
         
        using namespace std;
        int main(){
        int A,B,K;
          cin>>A;
          cin>>B;
          cin>>K;
         
        int ans[1000];
          int c = 0;
          for(int i = 1;i < 1000;i++){
            if(A % i == 0 & B % i == 0){
     
        	ans[c] = i;
            c++;
             }
          }
        cout<<ans[c - (K)];
          return 0;

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

#include<stdio.h>
int main(void)
{
  int a, b, k, i=0, n=1, ans, j=0, x=0, m[x], l;
  scanf("%d %d %d", &a ,&b ,&k);
  while(i<101){
    if(a%n=0 && b%n=0){
      for(j=0;j<k;j++){
        m[l]=n;
        l+=1;
      }
    }
  }
  k-=1;
  printf("%d", m[k]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: lvalue required as left operand of assignment
    7 |     if(a%n=0 && b%n=0){
      |                    ^
Language: C++

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

int cd(int a, int b, int k){
    int count = 0;
    int i;
    int list[100];
    int u = max(a,b);
    for(i=1;i<u; i++){
        if(a%i==0&&b%i==0){
            count++;
          list[count]=i;
        }
    }
    return list[count-k+1];
}

int main(){
    int a,b,k;
    int count;
    cin >> a >> b >>k;
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |     cout << ans;
      |             ^~~
      |             abs
Language: C

#include<stdio.h>
int main(void)
{
  int a, b, k, i=0, n=1, ans, j=0, x=0, m[x], l;
  scanf("%d %d %d", &a &b &k);
  while(i<101){
    if(a%n=0 && b%n=0){
      for(j=0;j<k;j++){
        m[l]=n;
        l+=1;
      }
    }
  }
  k-=1;
  printf("%d", m[k]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:24: error: invalid operands to binary & (have 'int *' and 'int')
    5 |   scanf("%d %d %d", &a &b &k);
      |                     ~~ ^
      |                     |
      |                     int *
main.c:7:20: error: lvalue required as left operand of assignment
    7 |     if(a%n=0 && b%n=0){
      |                    ^
Language: C++

#include<bits/stdc++.h>//atcoder.120.b
using namespace std;
int main (){
	int n,m,m1,n1,k,i,a,s=0;
	cin>>n>>m>>k;
	m1=m;
	n1=n;
	a=m%n;
	while(a!=0){
		m=n;
		n=r;
		a=m%n;
	}
	while(s<=k){
		if(n1%n==0&&m1%n==0){
			i=n;
			s++;
		}
		n--;
	}
	cout<<i;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'r' was not declared in this scope
   11 |                 n=r;
      |                   ^
Language: Java

public class Main {
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int a = stdIn.nextInt();
        int b = stdIn.nextInt();
        int k = stdIn.nextInt();
        int count = 0;
        int min;
        int[] num = new int[100];

        if(a>b) min = b;
        else min = a;
        for(int i=1;i<min+1;i++){
            if(a%i==0 && b%i==0) {
                num[count] = i;
                count++;
            }
        }
        System.out.println(num[count-k]);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner stdIn = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner stdIn = new Scanner(System.in);
                            ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#incldue <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,k;
	cin>>a>>b>>k;
	int sum=0,round=0;
	for (int i=100; i>=1; i--){
		if(a%i==0&&%1==0){
			round++;
		}
		if(round==k){
		     cout<<i;
		     break;	
		}
     }
     return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>b>>k;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <bits/stdc++.h>
a.cc:9:28: error: expected primary-expression before '%' token
    9 |                 if(a%i==0&&%1==0){
      |                            ^
a.cc:13:22: error: 'cout' was not declared in this scope
   13 |                      cout<<i;
      |                      ^~~~
a.cc:13:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//配列の受け取り

int intpow(int x,int y){
  double a=x,b=y;
  return pow(a,b);
}//(x,y) xをy乗する

int intfabs(int x){
  double a=x;
  return fabs(a);
}//(x) の絶対値

main(){
  int a=in(),b=in(),k=in(),i2=0;
  vector<int> n;
  for (int i=1;i<=min(a,b);i++){
    if (a%i==0 && b%i==0) {
      n[i2]=i;
      i2++;
    }
  }
  reverce(n.begin(),n.end());
  cout << n[k] << endl;
}

Compiler output:
a.cc:26:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   26 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:35:3: error: 'reverce' was not declared in this scope
   35 |   reverce(n.begin(),n.end());
      |   ^~~~~~~
Language: C++

#incldue <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,k;
	cin>>a>>b>>k;
	int sum=0,round=0;
	for (int i=100; i>=1; i--){
		if(a%i==0&&%1==0){
			round++;
		}
		if(round==k){
		     cout<<i;
		     break;	
		}
     }
     cout<<round;
     return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>b>>k;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <bits/stdc++.h>
a.cc:9:28: error: expected primary-expression before '%' token
    9 |                 if(a%i==0&&%1==0){
      |                            ^
a.cc:13:22: error: 'cout' was not declared in this scope
   13 |                      cout<<i;
      |                      ^~~~
a.cc:13:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:6: error: 'cout' was not declared in this scope
   17 |      cout<<round;
      |      ^~~~
a.cc:17:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

int main(void)
{
	int a, b, k,yaku[100],su;
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &k);
	int i,co=0;
	for (i = 1; i <= 100; i++) {
		if (a%i == 0) {
			if (b%i == 0) {
				yaku[co]=i;
				co++;
			}
		}
	}
	su = yaku[k-1];
	printf("%d\n", a);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d", &a);
      |         ^~~~~
a.cc:17:9: error: 'printf' was not declared in this scope
   17 |         printf("%d\n", a);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
Language: C++

#include<bits/stdc++.h>
#define MAX(a,b) (a>b? a:b)
#define MIN(a,b) (a>b? b:a)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repr(i,n) for(lint i=(lint)(n);i>0;--i)
#define reps(i,a,b) for(lint i=a;i<=(lint)(b);i++)
typedef long long lint;
typedef long double ld;
using namespace std;

lint ext_gcd(lint a, lint b, lint &x, lint &y){
	if(b==0) {
		x=1;
		y=0;
		return a;
	}
	lint q=a/b;
	lint g=ext_gcd(b,a-q*b,x,y);
	lint z=x-q*y;
	x=y;
	y=z;
	return g;
}

int main(){
lint A, B, K, *x, *y;
cin >> A >> B >> K;
lint d = ext_gcd(A,B,x,y);
int cnt = 0;
int n=d;
while(1) {
if(d%n==0) cnt++;
if(cnt==K) break;
n--;
}
cout << n << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: invalid conversion from 'lint*' {aka 'long long int*'} to 'lint' {aka 'long long int'} [-fpermissive]
   28 | lint d = ext_gcd(A,B,x,y);
      |                      ^
      |                      |
      |                      lint* {aka long long int*}
a.cc:11:36: note:   initializing argument 3 of 'lint ext_gcd(lint, lint, lint&, lint&)'
   11 | lint ext_gcd(lint a, lint b, lint &x, lint &y){
      |                              ~~~~~~^
a.cc:28:22: error: cannot bind rvalue '(lint)x' to 'lint&' {aka 'long long int&'}
   28 | lint d = ext_gcd(A,B,x,y);
      |                      ^
Language: C++

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

int main() {
	int a, b, k,j = 0,ar[1000000];
	cin >> a >> b >> k;
  	int i=min(a,b);
	while (1) {
		if (b%i == 0 && a%i == 0){
          j++; ar[j]=i;}
		i---;
	}cout << ar[k-1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before ';' token
   12 |                 i---;
      |                     ^
Language: C++

#include<iostream>

using namespace std;

int main() {
	int a, b, k,j = 0,ar[1000000];
	cin >> a >> b >> k;
  	int i=min(a,b);
	while (1) {
		if (b%i == 0 && a%i == 0){
          j++; ar[j]=i;}
		i---;
	}cout << ar[k-1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before ';' token
   12 |                 i---;
      |                     ^
Language: C++

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

int main(){
  int A,B,K,ans,count;
  cin >> A >> B >>K;
 
   for(int i=B;i>0;--i){
     if(A%B=0&&B%B=0){
       count++;
     }
     else if(count=K){
       break;
     }
   }
   cout << count <<endl;
}
  
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: lvalue required as left operand of assignment
    9 |      if(A%B=0&&B%B=0){
      |             ~^~~~~
Language: C++

#include<iostream>

using namespace std;

int main() {
	int a, b, k, i = 1, j = 0,a[1000000];
	cin >> a >> b >> k;
	while (1) {
		if (b%i == 0 && a%i == 0){
          j++; a[j]=i;}
		i++;
	}cout << a[j-k] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:35: error: conflicting declaration 'int a [1000000]'
    6 |         int a, b, k, i = 1, j = 0,a[1000000];
      |                                   ^
a.cc:6:13: note: previous declaration as 'int a'
    6 |         int a, b, k, i = 1, j = 0,a[1000000];
      |             ^
a.cc:10:17: error: invalid types 'int[int]' for array subscript
   10 |           j++; a[j]=i;}
      |                 ^
a.cc:12:19: error: invalid types 'int[int]' for array subscript
   12 |         }cout << a[j-k] << endl;
      |                   ^
Language: C++

int main(int argc, const char * argv[]) {
    int A,B,K;
    int k=0;
    cin>>A>>B>>K;
    for(int i=100;i>0;i--){
        if(A%i==0&&B%i==0){
            k++;
            if(k==K){cout<<i;return 0;}
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>A>>B>>K;
      |     ^~~
a.cc:8:22: error: 'cout' was not declared in this scope
    8 |             if(k==K){cout<<i;return 0;}
      |                      ^~~~
Language: C++

#include "pch.h"
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int A, B, K;
    vector<int> l;
    cin >> A;
    cin >> B;
    cin >> K;

    int i = 1;
    int count = 0;
    while (i <= 100) {
        if (A%i == 0 && B%i == 0) l.push_back(i);
        i++;
    }
    int len = l.size();
    cout << l[len-K];

    return 0;
}


Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

//AtCoder Beginner Contest 120
//B	K-th Common Divisor
public class Main19 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int K = sc.nextInt();

		sc.close();

		int ret = 0;
		int x = 0;
		for (int i = 100; i >= 0; i--) {
			if (A % i == 0 && B % i == 0) {
				ret = i;
				x++;
				if (x == K) {
					break;
				}
			}
		}

		System.out.print(ret);
	}
}


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

#include<iostream>
using namespace std;
int main(){
  int A, B, K;
  cin >> A >> B >> K;
  
  int count = 0;
  int kouyaku = 1;
  for(int i = 0; i < 100; ++i;){
    if( A%kouyaku == 0 && B%kouyaku == 0) ++count;
    ++kouyaku;
     if(count == K) break;
  } 
    cout << kouyaku << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ')' before ';' token
    9 |   for(int i = 0; i < 100; ++i;){
      |      ~                       ^
      |                              )
a.cc:9:31: error: expected primary-expression before ')' token
    9 |   for(int i = 0; i < 100; ++i;){
      |                               ^
Language: C++

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

int main(){
  int a, b, k;
  cin >> a >> b >> k;
  vector<int> d;
  for(int i = a ; i >= 0 ; --i){
    if(a % i == 0 && b % i == 0){
      d.emplace_back(i);
    }
  }
  cout << d[k - 1］ << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: unable to find numeric literal operator 'operator""\U0000ff3d'
   13 |   cout << d[k - 1］ << endl;
      |                 ^~~
a.cc:13:28: error: expected ']' before ';' token
   13 |   cout << d[k - 1］ << endl;
      |                            ^
      |                            ]
Language: C++

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

int main() {
  int L,amariA,amariB,k,A,B,K;
  string box;
  k=0;
  cin >> A>> B>> K;
  if (A<B){
    L=A;
  }
  else {
    L=B;
  }
  for ( int j=1; j<=L ; j++){
    amariA=A%j;
    amariB=B%j;
      if (amariA==0 && amariB==0){
        box(k)=j;
        k++;
      }
      j++;
  }
  cout << box(K-1) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   19 |         box(k)=j;
      |         ~~~^~~
a.cc:24:14: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   24 |   cout << box(K-1) << endl;
      |           ~~~^~~~~
Language: C

a,b,k=map(int,input().split())
inte=[];mini=min(a,b);j=1
for i in range(1,mini+1):
  if a%i==0 and b%i==0:
    inte.append(i)
inte.sort(reverse=True)
print(inte[k-1])

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,k=map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a,b,k=map(int,input().split())
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
    1 | a,b,k=map(int,input().split())
      |     ^
main.c:1:7: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | a,b,k=map(int,input().split())
      |       ^~~
main.c:1:11: error: expected expression before 'int'
    1 | a,b,k=map(int,input().split())
      |           ^~~
main.c:2:1: error: expected ',' or ';' before 'inte'
    2 | inte=[];mini=min(a,b);j=1
      | ^~~~
main.c:2:9: warning: data definition has no type or storage class
    2 | inte=[];mini=min(a,b);j=1
      |         ^~~~
main.c:2:9: error: type defaults to 'int' in declaration of 'mini' [-Wimplicit-int]
main.c:2:14: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
    2 | inte=[];mini=min(a,b);j=1
      |              ^~~
main.c:2:14: error: initializer element is not constant
main.c:2:23: warning: data definition has no type or storage class
    2 | inte=[];mini=min(a,b);j=1
      |                       ^
main.c:2:23: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
main.c:3:1: error: expected ',' or ';' before 'for'
    3 | for i in range(1,mini+1):
      | ^~~
Language: C++

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

int main() {
  int L,amariA,amariB,k,A,B,K;
  string box;
  k=0;
  cin >> A>> B>> K;
  if (A<B){
    L=A
  }
  else {
    L=B
  }
  for ( int j=1; j<=L ; j++){
    amariA=A%j;
    amariB=B%j;
      if (amariA==0 && amariB==0){
        box(k)=j;
        k++;
      }
      j++;
  }
  cout << box(K) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before '}' token
   10 |     L=A
      |        ^
      |        ;
   11 |   }
      |   ~     
a.cc:13:8: error: expected ';' before '}' token
   13 |     L=B
      |        ^
      |        ;
   14 |   }
      |   ~     
a.cc:19:12: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   19 |         box(k)=j;
      |         ~~~^~~
a.cc:24:14: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   24 |   cout << box(K) << endl;
      |           ~~~^~~
Language: C++

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

int main()
{
  int a,b,c;
  cin>>a>>b>>c
    int x=0,i=0,k=0;
  while(i++)
  {
    if( a%i==0&&b%i==0) k++;
    if(k==c)cout<<c<<endl,exit(0);
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'int'
    7 |   cin>>a>>b>>c
      |               ^
      |               ;
    8 |     int x=0,i=0,k=0;
      |     ~~~        
a.cc:9:9: error: 'i' was not declared in this scope
    9 |   while(i++)
      |         ^
a.cc:11:25: error: 'k' was not declared in this scope
   11 |     if( a%i==0&&b%i==0) k++;
      |                         ^
a.cc:12:8: error: 'k' was not declared in this scope
   12 |     if(k==c)cout<<c<<endl,exit(0);
      |        ^
Language: C++

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

int main() {
  int x,L,amariA,amariB,k;
  string box;
  k=0;
  cin >> A>> B>> K;
  if (A<B){
    L=A
  }
  else {
    L=B
  }
  for ( int j=1; j<=L ; j++){
    amariA=A%j;
    amariB=B%j;
      if (amariA==0 && amariB==0){
        box(k)=j;
        k++;
      }
      j++;
  }
  cout << box(K) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'A' was not declared in this scope
    8 |   cin >> A>> B>> K;
      |          ^
a.cc:8:14: error: 'B' was not declared in this scope
    8 |   cin >> A>> B>> K;
      |              ^
a.cc:8:18: error: 'K' was not declared in this scope
    8 |   cin >> A>> B>> K;
      |                  ^
a.cc:19:12: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   19 |         box(k)=j;
      |         ~~~^~~
Language: C++

#include<iostream>

using namespace std;

int main(){
	int a,b,k,i=1,j=0;
  while(1){if(b%i==0&&a%i==0){i++;j++;{
  else i++;
  if(k==j)break;
          }cout<<i<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected '}' before 'else'
    8 |   else i++;
      |   ^~~~
a.cc:7:39: note: to match this '{'
    7 |   while(1){if(b%i==0&&a%i==0){i++;j++;{
      |                                       ^
a.cc:8:3: error: expected '}' before 'else'
    8 |   else i++;
      |   ^~~~
a.cc:7:30: note: to match this '{'
    7 |   while(1){if(b%i==0&&a%i==0){i++;j++;{
      |                              ^
Language: C++

#include<iostream>

using namespace std;

int main(){
	int a,b,k,i=1,j=0;
  while(1){if(b%i==0&&a%i==0)i++;j++;
  else i++;
  if(k==j)break;
          }cout<<i<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else i++;
      |   ^~~~
Language: C++

int main() {
	int A, B, K, dmy, cnt = 1, cnt2 = 1;
	cin >> A >> B >> K;
	if (A < B) {
		dmy = B;
	}
	else {
		dmy = A;
	}
	while (cnt2 <= K) {
		if (A % cnt == 0 && B % cnt == 0) {
				cnt2++;
		}
		cnt++;
	}
	cout << cnt - 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> A >> B >> K;
      |         ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << cnt - 1;
      |         ^~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int A, B, K, dmy, cnt = 1, cnt2 = 1;
	cin >> A >> B >> K;
	if (A < B) {
		dmy = B;
	}
	else {
		dmy = A;
	}
	while (cnt2 <= K) {
		if (A % cnt == 0 && B % cnt == 0) {
				cnt2++;
		}
		cnt++;
	}
	cout << cnt - 1;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: expected '}' at end of input
   19 |         cout << cnt - 1;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  
  int A, B, K;
  cin >> A >> B >> K;
  
  int count=0;
  vector<int> lis;
  for(int i=1; i<=100; i++){
    if(A%i==0 && B%i==0){ 
      lis.push_back(i);
      count+=1;
    }

  cout << lis.at(lis.size()-K) << endl;

}



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

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

int main(){
  int A, B, K;
  cin >> A >> B >> K;
  for(int i = 100; i > 0; i--){
    if( A % i = 0 && B % i =0){
      K--;
    if(K == 0){
      cout << i << endl;
    }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as left operand of assignment
    8 |     if( A % i = 0 && B % i =0){
      |                 ~~^~~~~~~~
Language: Java

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


public class MainClass {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.next());
        int b = Integer.parseInt(scanner.next());
        int k = Integer.parseInt(scanner.next());
        scanner.close();
        List<Integer> list1 = new ArrayList<Integer>();
        List<Integer> list2 = new ArrayList<Integer>();
        List<Integer> res = new ArrayList<Integer>();
        for(int i = 1; i <= a ; i++){
            if(a%i == 0) list1.add(i);
        }
        for(int i = 1; i <= b ; i++){
            if(b%i == 0) list2.add(i);
        }
        for(Integer u : list1){
            if(list2.contains(u)){
                res.add(u);
            }
        }

        System.out.println(res.get(res.size() - k));
    }
}


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

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

int main()
{
    int a, b, c;

    scanf("%d %d %d", &a, &b, &c);

    int temp = 0;
    if (a < b)
    {
        tmp = a;
        a = b;
        b = tmp;
    }

    /* ユークリッドの互除法 */
    int r = a % b;
    while (r != 0)
    {
        a = b;
        b = r;
        r = a % b;
    }

    vector<int> v;
    for(int i = 1;i<=b;i++){
        if(b%i == 0){
            v.push_back(i);
        }

    }

    
    
    cout << v[c];
    

}


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

#include <iostream>
#include <algorithm>

int main(){
  int a,b,c;
  std::cin>>a>>b>>k;
  int temp = 0;
  int ans = 0;

  for(int i = std::min(a,b); i > 1; i--){
    if(a%i == 0 && b%i == 0){
      temp += 1;
    }
    if(temp == k){
      ans = i;
      break;
    }
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'k' was not declared in this scope
    6 |   std::cin>>a>>b>>k;
      |                   ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

int main()
{
    int a, b, c;

    scanf("%d %d %d", &a, &b, &c);

    int temp = 0;
    if (a < b)
    {
        tmp = a;
        a = b;
        b = tmp;
    }

    /* ユークリッドの互除法 */
    r = a % b;
    while (r != 0)
    {
        a = b;
        b = r;
        r = a % b;
    }

    vector<int> v;
    for(int i = 1;i<=b;i++){
        if(b%i == 0){
            v.push_back(i);
        }

    }

    
    
    cout << v[c];
    

}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'tmp' was not declared in this scope; did you mean 'temp'?
   29 |         tmp = a;
      |         ^~~
      |         temp
a.cc:35:5: error: 'r' was not declared in this scope
   35 |     r = a % b;
      |     ^
Language: C++

#include<bits/stdc++.h>//atcoder.120.b
using namespace std;
bool p(int n,int m){
	int s=0;
for(int i=n;i>1;i--)
	if(n%i==0&&m%i==0)s++;
if(s==0)return true;
else return false;
int main (){
	int n,m,k,a,s=0;
	cin>>n>>m>>k;
	if(p(n,m)){
		cout<<1;
		return 0;
	}
	if(n>m)a=m;
	else a=n;
	while(s<=k){
		if(n%a==0&&m%a==0)s++;
		a--;
	}
	cout<<a;
return 0;
}

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

#include <iostream>
 
using namespace std;
 
int main() {
  int A, B, K;
  cin >> A >> B >> K;
  
  if (A > B) {
    int d = A;
  } else {
    int d = B;
  }

  int count = 0;
  while (count < K) {
    if (A % d == 0 && B % d == 0) {
      count++;
    }
    d--;
  }
  cout << d;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'd' was not declared in this scope
   17 |     if (A % d == 0 && B % d == 0) {
      |             ^
a.cc:20:5: error: 'd' was not declared in this scope
   20 |     d--;
      |     ^
a.cc:22:11: error: 'd' was not declared in this scope
   22 |   cout << d;
      |           ^
Language: C++

#include <iostream>
#include <cmath>
#include <string>
using namespace std;

int gcd(int a, int b){
    int g = max(a,b);
    int l = min(a,b);
    if(g % l){
        return gcd(l, g % l);
    }else{
        return l;
    }
}

int main(){
    int A,B,K;
    int n,m;
    int cnt = 0;
    cin >> A >> B >> K;
    n = gcd(A,B);
    for(int i=n;i > 0;i--){
        if(n%i == 0){
            cnt++;
            if(cnt == K){
                m = i;
                break;
            }
        }
    }
    cout << m << endl;

}

int main(){
    int A,B,K;
    int n,m;
    int cnt = 0;
    cin >> A >> B >> K;
    n = gcd(A,B);
    for(int i=n-1;i > 0;i--){
        if(n%i == 0){
            cnt++;
            if(cnt == K){
                m = i;
                break;
            }
        }
    }
    cout << m << endl;

}


Compiler output:
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main(){
      |     ^~~~
a.cc:16:5: note: 'int main()' previously defined here
   16 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  int A, B, K; cin >> A >> B >> K;
 
  int d[100];
  for(int i=0;i<100;i++){
    d[i] = 0;
  }
  int denominator=2;
  int j=0;
  do{
    if(A/denominator==0 && B/denominator==0){
      d[j] = denominator;
      j++;
    }
    denominator++;
  }while(denominator <= A && denominator <= B);
  
  sort(d.begin(),d.end(),greater<int>());
  cout << d[K] << endl;
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: request for member 'begin' in 'd', which is of non-class type 'int [100]'
   23 |   sort(d.begin(),d.end(),greater<int>());
      |          ^~~~~
a.cc:23:20: error: request for member 'end' in 'd', which is of non-class type 'int [100]'
   23 |   sort(d.begin(),d.end(),greater<int>());
      |                    ^~~
Language: C++

include <iostream>
include <algorithm>

using namespace std;

int main(){
  int A, B, K; cin >> A >> B >> K;
 
  int d[100];
  for(int i=0;i<100;i++){
    d[i] = 0;
  }
  int denominator=2;
  int j=0;
  do{
    if(A/denominator==0 && B/denominator==0){
      d[j] = denominator;
      j++;
    }
    denominator++;
  }while(denominator <= A && denominator <= B);
  
  sort(d.begin(),d.end(),greater<int>());
  cout << d[K] << endl;
  return 0; 
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
    7 |   int A, B, K; cin >> A >> B >> K;
      |                ^~~
a.cc:23:10: error: request for member 'begin' in 'd', which is of non-class type 'int [100]'
   23 |   sort(d.begin(),d.end(),greater<int>());
      |          ^~~~~
a.cc:23:20: error: request for member 'end' in 'd', which is of non-class type 'int [100]'
   23 |   sort(d.begin(),d.end(),greater<int>());
      |                    ^~~
a.cc:23:26: error: 'greater' was not declared in this scope
   23 |   sort(d.begin(),d.end(),greater<int>());
      |                          ^~~~~~~
a.cc:23:34: error: expected primary-expression before 'int'
   23 |   sort(d.begin(),d.end(),greater<int>());
      |                                  ^~~
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |   sort(d.begin(),d.end(),greater<int>());
      |   ^~~~
      |   short
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << d[K] << endl;
      |   ^~~~
a.cc:24:19: error: 'endl' was not declared in this scope
   24 |   cout << d[K] << endl;
      |                   ^~~~
Language: C++

a, b, k = map(int, input().split())

count=0
for sei in reversed(range(1,max((a,b)))):
    if a%sei==0 and b%sei==0:
        count += 1
        if count == k:
            break

print(sei)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, k = map(int, input().split())
      | ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(void) {
  int A, B, K;
  cin >> A >> B >> K;
  int ans = 0;
  while (K > 0) {
    ans++;
    if (A % ans == 0 && B % ans == 0) {
      K--;
    }
  }
  cout << i << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'i' was not declared in this scope
   16 |   cout << i << endl;
      |           ^
Language: C++

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

int main(){
  int A,B,K;
  cin>>A>>B>>K;
  vector<int> s(0,0);
  for(int i=100; i>0; --i){
    if(A%i==0 && B%i==0) s.push_back();
  }
  cout<<s.at(K-1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: no matching function for call to 'std::vector<int>::push_back()'
    9 |     if(A%i==0 && B%i==0) s.push_back();
      |                          ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
Language: C++

a,b,k=list(map(int, input().split()))

DivList = []

for i in range(min(a,b)+1):
    if i ==0:
        continue
    if a % i == 0 and b%i ==0:
        DivList.append(i)
DivList.sort(reverse=True)
# print(DivList)
print(DivList[k-1])

Compiler output:
a.cc:11:3: error: invalid preprocessing directive #print
   11 | # print(DivList)
      |   ^~~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,k=list(map(int, input().split()))
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define REP(i,n) for(int i=0; i<int(n); i++)
#define FOR(i,m,n) for(int i=int(m); i<int(n); i++)
#define ALL(obj) (obj).begin(),(obj).end()
#define VI vector<int>
#define VLL vector<long long>
#define VVI vector<vector<int>>
#define VVLL vector<vector<long long>>
#define VC vector<char>
#define VS vector<string>
#define VVC vector<vector<char>>
#define fore(i,a) for(auto &i:a)

typedef pair <int, int> P;
template<class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
const int  INF = 1 << 25;
const ll INFL = 1223372036854775807;
const ll mod = 1000000007;

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


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

	int n = gcd(a, b);

	for (int i = n; i >= 0; i--); {
		if (n%i == 0) {
			c--;
			if (c == 0) {
				cout << i << endl;
				return 0;
			}
		}
	}
	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:23: error: 'i' was not declared in this scope
   37 |                 if (n%i == 0) {
      |                       ^
Language: C++

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

int main(){
  int A,B,K;
  cin>>A>>B>>K;
  vector<int> s;
  for(int i=0; i<100; ++i) s.at(i)=0;
  for(int i=100; i>0; --i){
    if(A%i==0 && B%i==0) s.push_back();
  }
  cout<<s.at(K-1)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: no matching function for call to 'std::vector<int>::push_back()'
   10 |     if(A%i==0 && B%i==0) s.push_back();
      |                          ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D;
  cin >> A>>B>>C;
  D = A;
  if(A>B){
    A = B;
    B = D;
  }
  int a[2000];
  a[0] = 1;
  int k = 1;
  for(int i = 2;i<= A;i++){
    if(a%i==0&&b%i==0){
      a[k] = i;
      k++;
    }
  }
  cout << a[C-1] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: invalid operands of types 'int [2000]' and 'int' to binary 'operator%'
   15 |     if(a%i==0&&b%i==0){
      |        ~^~
      |        | |
      |        | int
      |        int [2000]
a.cc:15:16: error: 'b' was not declared in this scope
   15 |     if(a%i==0&&b%i==0){
      |                ^
Language: C++

/* ---------- STL Libraries ---------- */
// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>
#include <cstring>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#include <stack>

/* ---------- Namespace ---------- */
using namespace std;

/* ---------- Type ---------- */
using ll = long long;
#define int ll
#define P pair<ll, ll>

/* ---------- Constants  */
const double PI = 3.141592653589793238462643383279;
const ll MOD = 1e9 + 7;
const int INF = 1LL << 55;

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */
vector<int> divisor(int n) {
    vector<int> ret;

    for (int i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i != n / i) ret.push_back(n / i);
        }
    }

    return move(ret);
}

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

signed main() {
    int A, B, K;
    cin >> A >> B >> K;
    int G = gcd(A, B);
    vector<int> g = divisor(G);
    sort(g.begin(), g.end100 50 4(), greater<>());
    cout << g[K-1] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:23: error: 'class std::vector<long long int>' has no member named 'end100'
   66 |     sort(g.begin(), g.end100 50 4(), greater<>());
      |                       ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define int long long
#define mod 1000000007
#define F first
#define S second
#define P pair<long long,long long>
#define all(a) a.begin(),a.end()
using namespace std;
int gcd(int a, int b){
    if(b==0) return a;
    else return gcd(b,a%b);
}
signed main(){
    int a,b,k; cin>>a>>b>>k;
    int c=gcd(a, b);
    for(int i=c; i>=1; i--){
        if(c%i==0){
            k--;
        }
        if(k==0){
            cout<<i<<endl;
            return 0;
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:25:6: error: expected '}' at end of input
   25 |     }
      |      ^
a.cc:14:14: note: to match this '{'
   14 | signed main(){
      |              ^
Language: C++

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int A, B, C;
	cin >> A >> B >> C;
	int ans = 1;
	while (C)
	{
		if (A % ans == 0 && B % C == 0) C--;
		ans++
	}
	cout << ans << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:13:22: error: expected ';' before '}' token
   13 |                 ans++
      |                      ^
      |                      ;
   14 |         }
      |         ~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
#include <bits/stdc++.h>
#include <utility>
#include <iomanip>

#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a); (b) <= i; i--)
#define REP(i,n) for(int i = 0; i < (n); i++)
#define RREP(i,n) for(int i = n; n <= i; i--)
#define ABS(a) ((a < 0) ? ((-1)*(a)) : (a))
#define elif else if
#define MOD 1000000007
#define INF (1<<30)

using namespace std;

#define ld long double
#define ll long long

map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll ans;
  ll A,B,K;
  cin >> A >> B >> K;
  ma=max(A,B);
  int cnt=0;
  for(int i=1;i<=ma;i++){
    if(A%i==0 && B%i==0){
      cnt++;
      if(cnt==K){
        cout << i << endl;
        return 0;
      }
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:3: error: 'ma' was not declared in this scope; did you mean 'mpa'?
   44 |   ma=max(A,B);
      |   ^~
      |   mpa
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
//#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int a,b,k;cin>>a>>b>>k;
  int cnt = 0;
  repd(i,1,min(a,b)+1){
    if(a%i==0 && b%i==0)cnt++;
    if(cnt == k){
      cout << i << endl;
      return;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |       return;
      |       ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a, b, k;
  cin >> a >> b >> k;
  int cnt=0;
  for(int i=100; i<n && cnt<k; i--){
    if(a%i==0 && b%i==0)cnt++;
    if(cnt==k)cout << i;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'n' was not declared in this scope
    8 |   for(int i=100; i<n && cnt<k; i--){
      |                    ^