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

#include "stdafx.h"
#include <iostream>
#include <sstream>

using namespace std;

int gcd(int x, int y);

int main()
{
	string str;
	getline(cin, str);
	stringstream ss_size(str);
	
	int ary[2];
	string buff;
	int cnt = 0;
	while (getline(ss_size, buff, ' ')) {
		stringstream ss(buff);
		ss >> ary[cnt];
		cnt++;
	}

	//insert_sort(str, ary_size);
	cout << gcd(ary[0], ary[1]) << endl;
    return 0;
}
int gcd(int x, int y) {
	if (x < y) {
		int tmp = y;
		y = x;
		x = tmp;
	}
	int q = y;
	int r = x % y;

	if (r == 0) {
		// recursive end
		return y;
	}
	return gcd(q, r);
}

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

#include <iostream>
using namespace std;

int main() 
{
	int xi, yi, n, a[n], x, y;
	cin >>xi >>yi;
	if (xi<yi){x=yi; y=xi}
	else {x=xi; y=yi;}
	a[1]=x%y;
	
	
	if(a[1]!=0)
	{
		a[2]=y%a[1];
		if(a[2]!=0)
		{
			for(;;)
			{
				
				a[n]=a[n-1]%a[n-2];
				if(a[n-2]=0)break;
			}
		cout << a[n-1] <<'\n';
		}
		else cout <<a[1]<<'\n';
	}
	else cout<<y<<'\n';
	
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before '}' token
    8 |         if (xi<yi){x=yi; y=xi}
      |                              ^
      |                              ;
Language: C++

#include<stdio.h>
int gcd(int x, int y){
    return (x%y>0 || x>Y) ? gcd(y, x%y) : y;
}
int main(){
    int x, y;
    int w;
    scanf("%d %d", &x, &y);
    w = gcd(x, y);
    printf("%d\n", w);
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:3:24: error: 'Y' was not declared in this scope
    3 |     return (x%y>0 || x>Y) ? gcd(y, x%y) : y;
      |                        ^
Language: C++

void swap(int *x, int *y)
{
        int tmp;

        tmp = *x;
        *x = *y;
        *y = tmp;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#Include <stdio.h>
#include <stdlib.h>

int main(){

  int a,b,c,r,x,y,flag;

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

  if(a == b){
    printf("%d\n",a);
    exit(1);
  }
  else if(a > b){
    flag = 0;
    c = b;
  }
  else{
    c = a;
    flag = 1;
  }
  
  if(flag == 0) r = a % b;
  if(flag == 1) r = b % a;

  while(1){
    x = c % r;
    if(x == 0) break;
    c = r;
    r = x;
    // printf("%d %d %d\n",x,c,r);
  }

  printf("%d\n",r);

  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'scanf' was not declared in this scope
    8 |   scanf("%d%d",&a,&b);
      |   ^~~~~
a.cc:11:5: error: 'printf' was not declared in this scope
   11 |     printf("%d\n",a);
      |     ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdlib.h>
  +++ |+#include <cstdio>
    3 | 
a.cc:34:3: error: 'printf' was not declared in this scope
   34 |   printf("%d\n",r);
      |   ^~~~~~
a.cc:34:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;
int GCD(int a, int b){
    while (b) {
        temp = b;
        b = a % b;
        a = temp;
    }
    return a;
}
int main() {
    int i,j,k;
    cin>>i>>j;
    if (i>=j){
        k=GCD(i,j);
    }else{
        k=GCD(j,i);
    }
    cout<<k<<endl;
    return 0;
}

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

#include <stdio.h>
int main(void){
  int x;
  int y;
  int i;
  scanf("%d %d",&x,&y);
  if(x>y){
  int max=y;
    for(i=0;i<y;i++){

      if(x%max==0&&y%max==0){
        printf("%d\n",max);
exit(0);
      }
      max--;
    }
  }else{
  int max=x;
    for(i=0;i<x;i++){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
exit(0);
      }
      max--;
    }
  }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: 'exit' was not declared in this scope
   13 | exit(0);
      | ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include <stdio.h>
  +++ |+#include <cstdlib>
    2 | int main(void){
a.cc:22:1: error: 'exit' was not declared in this scope
   22 | exit(0);
      | ^~~~
a.cc:22:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
Language: C++

#include <cstdio>
int main(void){
  int x;
  int y;
  int i;
  scanf("%d %d",&x,&y);
  if(x>y){
  int max=y;
    for(i=0;i<y;i++){

      if(x%max==0&&y%max==0){
        printf("%d\n",max);
exit(0);
      }
      max--;
    }
  }else{
  int max=x;
    for(i=0;i<x;i++){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
exit(0);
      }
      max--;
    }
  }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: 'exit' was not declared in this scope
   13 | exit(0);
      | ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include <cstdio>
  +++ |+#include <cstdlib>
    2 | int main(void){
a.cc:22:1: error: 'exit' was not declared in this scope
   22 | exit(0);
      | ^~~~
a.cc:22:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
Language: C++

#include <bits/stdc++.h>
 
 using namespace std;
 
 __int64 gcd(__int64 a,__int64 b)
 {
 	if(0==b) return a;
 	return gcd(b, a%b);
 }
 
 int main()
 {
 	__int64 a, b;
 	scanf("%I64d %I64d", &a, &b);
 	printf("%I64d\n", gcd(a,b));
 	return 0;
 }

Compiler output:
a.cc:5:2: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 |  __int64 gcd(__int64 a,__int64 b)
      |  ^~~~~~~
      |  __int64_t
a.cc: In function 'int main()':
a.cc:13:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   13 |         __int64 a, b;
      |         ^~~~~~~
      |         __ynf64
a.cc:14:31: error: 'a' was not declared in this scope
   14 |         scanf("%I64d %I64d", &a, &b);
      |                               ^
a.cc:14:35: error: 'b' was not declared in this scope
   14 |         scanf("%I64d %I64d", &a, &b);
      |                                   ^
Language: C++

#include <bits/stdc++.h>

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

int main() {
int a,b;cin>>a>>b;
cout<<gcd(a,b)<<endl;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:3:56: error: 'y' was not declared in this scope
    3 | int gcd(int a,int b){ if(b==0)return a;else return gcd(y,x%y); }
      |                                                        ^
a.cc:3:58: error: 'x' was not declared in this scope
    3 | int gcd(int a,int b){ if(b==0)return a;else return gcd(y,x%y); }
      |                                                          ^
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | int a,b;cin>>a>>b;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout<<gcd(a,b)<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 | cout<<gcd(a,b)<<endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

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

int main() {
int a,b;cin>>a>>b;
cout<<gcd(a,b)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | int a,b;cin>>a>>b;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout<<gcd(a,b)<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 | cout<<gcd(a,b)<<endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int gcd(int x, int y)
{
	if (y == 0)
		return x;
	if (x > y)
		gcd(y, x%y);
}
void main()
{
	int x, y;
	cin >> x >> y;
	cout << gcd(x, y);
}

Compiler output:
a.cc:10:1: error: '::main' must return 'int'
   10 | void main()
      | ^~~~
a.cc: In function 'int gcd(int, int)':
a.cc:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    9 | }
      | ^
Language: C++

include <iostream>
using namespace std;

int main() {
  int ans;
  int x, y;

  cin >> x >> y;

  while (x % y != 0) {
    int tmp = x;
    x = y;
    y = tmp % y;
  }

  cout << y << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> x >> y;
      |   ^~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << y << endl;
      |   ^~~~
a.cc:16:16: error: 'endl' was not declared in this scope
   16 |   cout << y << endl;
      |                ^~~~
Language: C++

#include <cstdio>
using namespace std;

int gcd(x,y){
    if(y>x){
        int t = x;
        x = y;
        y = t;
    }
    if(y==0){
        return x;
    }else{
        return gcd(y,x%y);
    }
}

int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d",gcd(a,b));
}

Compiler output:
a.cc:4:9: error: 'x' was not declared in this scope
    4 | int gcd(x,y){
      |         ^
a.cc:4:11: error: 'y' was not declared in this scope
    4 | int gcd(x,y){
      |           ^
a.cc:4:12: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | int gcd(x,y){
      |            ^
a.cc: In function 'int main()':
a.cc:20:20: error: 'gcd' cannot be used as a function
   20 |     printf("%d",gcd(a,b));
      |                 ~~~^~~~~
Language: C++

#include <iostream>
using namespase std;

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

int main(void){
    int x, y;
    cin >> x >> y;
    cout << gcd(x,y) << endl;
    return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc:4:1: error: ISO C++ forbids declaration of 'gcd' with no type [-fpermissive]
    4 | gcd(int a, int b){
      | ^~~
a.cc: In function 'int main()':
a.cc:13:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |     cin >> x >> y;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout << gcd(x,y) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     cout << gcd(x,y) << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>

int main()
{
	int x,y,maxi = 1;
	
	cin >> x >> y;
	
	if(x < y) swap(x,y);
	
	for(int d = 1; d <= (x%y); d++)
	{
		if(y % d == 0 && (x%y) % d == 0) maxi =d;
	}
	
	cout << maxi;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> x >> y;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:19: error: 'swap' was not declared in this scope
   10 |         if(x < y) swap(x,y);
      |                   ^~~~
a.cc:10:19: note: suggested alternatives:
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/tuple:2823:5: note:   'std::swap'
 2823 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |         cout << maxi;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for (int i=n;^i;i--)
#define ALL(v) v.begin(),v.end()
// #define int ll 
#define eps 1e-9
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; }
template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; }
typedef long long ll;

int gcd(int,int);

int main(){
        int a,b;
        cin >> a >> b;
        cout << gcd(a,b) << endl;
}

int gcd(int a,int b){
        if (!b) return a;
        gcd(b,a%b);
}
~                   

Compiler output:
a.cc:26:2: error: expected class-name at end of input
   26 | ~
      |  ^
a.cc: In function 'int gcd(int, int)':
a.cc:24:12: warning: control reaches end of non-void function [-Wreturn-type]
   24 |         gcd(b,a%b);
      |         ~~~^~~~~~~
Language: C++

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

int main() {
	int x;
	int y;
	int big;
	int small;
	int tmp;
	scanf("%d%d",&x,&y);
	if(x>y){
		big = x;
		small = y;
	}else{
		big = y;
		small = x;
	}
	while(small != 0){
		tmp = small;
		small = big % small;
		big = tmp;
	}
	printf("%d\n",big)
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: expected ';' before 'return'
   24 |         printf("%d\n",big)
      |                           ^
      |                           ;
   25 |         return 0;
      |         ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a[100000]={0},b[100000]={0},sa=0;sb=0,A;
int x,y,n=1,;
cin>>x;
while(true){

if(x%n==0){
if(x/n<n)
break;
a[n]=1;

a[x/n]=1;
sa+=2;
if(x/n==n)
sa--;


}
if(x==n)
break;
n++;
}
n=1;
cin>>y;
while(true){
if(y%n==0){
if(y/n<n)
break;
b[n]=1;

b[y/n]=1;
sb+=2;
if(y/n==n)
sb--;

}
if(y==n)
break;
n++;
}
n=0;
while(true){
n++;
if(b[n]==a[n])
A=n;
if(n==x||n==y)
break;



}

cout<<A<<endl;



retern 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:38: error: 'sb' was not declared in this scope; did you mean 'sa'?
    4 | int a[100000]={0},b[100000]={0},sa=0;sb=0,A;
      |                                      ^~
      |                                      sa
a.cc:4:43: error: 'A' was not declared in this scope
    4 | int a[100000]={0},b[100000]={0},sa=0;sb=0,A;
      |                                           ^
a.cc:5:13: error: expected unqualified-id before ';' token
    5 | int x,y,n=1,;
      |             ^
a.cc:59:1: error: 'retern' was not declared in this scope; did you mean 'extern'?
   59 | retern 0;
      | ^~~~~~
      | extern
Language: C++

#include<iostream>
using namespace std;
 int USCLN(int a, int b)
        {            
            a=Math.Abs(a); 
            b=Math.Abs(b);            
            if (a==0 ||b==0)
                return a+b;
            while (a!=b)
            {
                if(a>b)
                    a=a-b;
                else
                    b=b-a;
            }
            return a;
        }
int main()
{
   int a, b;
   cin >> a >> b;
   cout << USCLN(a,b) << endl;

}

Compiler output:
a.cc: In function 'int USCLN(int, int)':
a.cc:5:15: error: 'Math' was not declared in this scope
    5 |             a=Math.Abs(a);
      |               ^~~~
Language: C++

#include<iostream>
using namespace std;
int a,b;
gcd(int a,int b)
{
	if(b==0) return a;
	return gcd(b,a%b);
}
int main()
{
	cin>>a>>b;
	cout<<gcd(a,b);
	return 0;
}

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'gcd' with no type [-fpermissive]
    4 | gcd(int a,int b)
      | ^~~
Language: C++

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

#define B

#ifdef B
int main(void) {
	int x, y;
	cin >> x >> y;
	while (x != y)
	{
		if (x > y)
			x -= y;
		else
			y -= x;
	}
	cout << x <<endl;
	return 0;
}

Compiler output:
a.cc:9: error: unterminated #ifdef
    9 | #ifdef B
Language: C++

#include <iostream>

using namespace std;

int gcd(x,y){
   if(x == y){
      return x;
   }else if(x > y){
      return gcd(y,x%y);
   }else{
      return gcd(x,y%x);
   }
}

int main(){
   int a,b;
   cin >> a >> b;
   
   cout << gcd(a,b) << endl;
}

Compiler output:
a.cc:5:9: error: 'x' was not declared in this scope
    5 | int gcd(x,y){
      |         ^
a.cc:5:11: error: 'y' was not declared in this scope
    5 | int gcd(x,y){
      |           ^
a.cc:5:12: error: expression list treated as compound expression in initializer [-fpermissive]
    5 | int gcd(x,y){
      |            ^
a.cc: In function 'int main()':
a.cc:19:15: error: 'gcd' cannot be used as a function
   19 |    cout << gcd(a,b) << endl;
      |            ~~~^~~~~
Language: C++

// ALDS1_1_B_GreatestCommonDivisor.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include "stdafx.h"

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

int GCD(int x, int y)
{
	if (y > x)
	{
		swap(x, y);
	}
	while (y > 0)
	{
		int a = x % y;
		x = y;
		y = a;
	}
	return x;
}


int main()
{
	int x, y;
	cin >> x;
	cin >> y;

	cout << GCD(x, y) << endl;

    return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<isotream>
using namespace std;

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

	int n;
	for (int i = 1; i < a / 2; i++){
		if (a%i == 0 && b%i == 0) n = i;
	}

	cout << n << endl;
}

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


#include<iostream>
using namespace std;

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

	int n=0;
	for (int i = 1; i < a / 2; i++){
		if (a%i == 0 && b%i == 0) n = i;
	}

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: 'c' was not declared in this scope
    9 |         if (a < b) int c = a; a = b; b = c;
      |                                          ^
Language: C++

#include<iostream>
using namespace std;

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

	int n=0;
	for (int i = 1; i < a / 2; i++){
		if (a%i == 0 && b%i == 0) n = i;
	}

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: 'c' was not declared in this scope
    8 |         if (a < b) int c = a; a = b; b = c;
      |                                          ^
Language: C++


#include<iostream>
using namespace std;

int god(x, y)
{
	if (a < b){
		c = a; a = b; b = c;
	}
	for (int i = b; i >= 1; i--;){
		if (a%i == 0 && b%i == 0)
			n = i;
	}
	return n;
}

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

	int n=god(x, y);

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc:5:9: error: 'x' was not declared in this scope
    5 | int god(x, y)
      |         ^
a.cc:5:12: error: 'y' was not declared in this scope
    5 | int god(x, y)
      |            ^
a.cc:5:13: error: expression list treated as compound expression in initializer [-fpermissive]
    5 | int god(x, y)
      |             ^
a.cc: In function 'int main()':
a.cc:24:19: error: 'x' was not declared in this scope
   24 |         int n=god(x, y);
      |                   ^
a.cc:24:22: error: 'y' was not declared in this scope
   24 |         int n=god(x, y);
      |                      ^
a.cc:24:23: error: 'god' cannot be used as a function
   24 |         int n=god(x, y);
      |                       ^
Language: C++

#include<iostream>
using namespace std;

int god(int x, int y)
{
	if (a < b){
		c = a; a = b; b = c;
	}
	for (int i = b; i >= 1; i--;){
		if (a%i == 0 && b%i == 0)
			n = i;
	}
	return n;
}

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

	int n=god(x, y);

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int god(int, int)':
a.cc:6:13: error: 'a' was not declared in this scope
    6 |         if (a < b){
      |             ^
a.cc:6:17: error: 'b' was not declared in this scope
    6 |         if (a < b){
      |                 ^
a.cc:7:17: error: 'c' was not declared in this scope
    7 |                 c = a; a = b; b = c;
      |                 ^
a.cc:9:22: error: 'b' was not declared in this scope
    9 |         for (int i = b; i >= 1; i--;){
      |                      ^
a.cc:9:36: error: expected ')' before ';' token
    9 |         for (int i = b; i >= 1; i--;){
      |             ~                      ^
      |                                    )
a.cc:9:37: error: expected primary-expression before ')' token
    9 |         for (int i = b; i >= 1; i--;){
      |                                     ^
a.cc:13:16: error: 'n' was not declared in this scope
   13 |         return n;
      |                ^
a.cc: In function 'int main()':
a.cc:23:19: error: 'x' was not declared in this scope
   23 |         int n=god(x, y);
      |                   ^
a.cc:23:22: error: 'y' was not declared in this scope
   23 |         int n=god(x, y);
      |                      ^
Language: C++


#include<iostream>
using namespace std;

int god(int a, int b)
{
	int c;
	if (a < b){
		c = a; 
		a = b; 
		b = c;
	}
	for (int i = b; i >= 1; i--;){
		if (a%i == 0 && b%i == 0)
			n = i;
	}
	return n;
}

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

	int n=god(a, b);

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int god(int, int)':
a.cc:13:36: error: expected ')' before ';' token
   13 |         for (int i = b; i >= 1; i--;){
      |             ~                      ^
      |                                    )
a.cc:13:37: error: expected primary-expression before ')' token
   13 |         for (int i = b; i >= 1; i--;){
      |                                     ^
a.cc:17:16: error: 'n' was not declared in this scope
   17 |         return n;
      |                ^
Language: C++


#include<iostream>
using namespace std;

int god(int a, int b)
{
	int c,n;
	if (a < b){
		c = a; 
		a = b; 
		b = c;
	}
	for (int i = b; i >= 1; i--;){
		if (a%i == 0 && b%i == 0)
			n = i;
	}
	return n;
}

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

	int n=god(a, b);

	cout << n << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int god(int, int)':
a.cc:13:36: error: expected ')' before ';' token
   13 |         for (int i = b; i >= 1; i--;){
      |             ~                      ^
      |                                    )
a.cc:13:37: error: expected primary-expression before ')' token
   13 |         for (int i = b; i >= 1; i--;){
      |                                     ^
Language: C++

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

int gcd(int a,int b) {
  if (a<b) {
    swap(a,b);
  }
  if (b==0) {
    return a;
  }
  return gcd(b,a%b);
}
int main() {
  int x, y;
  cin >> x >> y;
  printf("%d\n",gcd(x,y));
  return 0;

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

def gcd(x, y):
    if x<y:
        return gcd(y, x)
    while x%y!=0:
        r = x%y
        x, y = y, r
    return r

iinfo = map(int, input().split())
print(gcd[info0], info[1]))

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def gcd(x, y):
      | ^~~
Language: C++

#include <stdio.h>
void insertionsort(int A[],int count);
void swap(int *p_form,int *p_to);
int A[1000000000];
int main(){
  int x,y,z,i,j,count,ans;
  scanf("%d %d",&x,&y);
  if(x==y){
    printf("%d\n",x);
  } else {
    count=0;
    if(x<y){
      z=x;
      x=y;
      y=z;
    }
    for(i=1;i<=y;i++){
      if(y%i==0){
        count++;
        A[count]=i;
      }
    }
    for(i=1;i<=(x%y);i++){
      if((x%y)%i==0){
        count++;
        A[count]=i;
      }
    }
    insertionsort(A,count);
    for(i=0;i<count-1;i++){
      if(A[i]==A[i+1]){
        ans=A[i+1];
      }
    }
    printf("%d\n",ans);
  }
  return 0;
}
void insertionsort(int A[],int count){
  int i,j;
  for(i=0;i<sum;i++){
    j=i;
    while(j>0&&A[j-1]>A[j]){
      swap(&A[j-1],&A[j]);
      j--;
    }
  }
}
void swap(int *p_from,int *p_to){
  int t;
  t=*p_from;
  *p_from=*p_to;
  *p_to=t;
}

Compiler output:
a.cc: In function 'void insertionsort(int*, int)':
a.cc:41:13: error: 'sum' was not declared in this scope
   41 |   for(i=0;i<sum;i++){
      |             ^~~
Language: C++

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000], b_divisor[1000000000];
    int i, j
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisior += [a/i];
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'scanf'
    8 |     scanf("%d%d", &a, &b);
      |     ^~~~~
a.cc:12:13: error: 'a_divisior' was not declared in this scope; did you mean 'a_divisor'?
   12 |             a_divisior += [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
a.cc:12:29: error: expected ',' before '/' token
   12 |             a_divisior += [a/i];
      |                             ^
      |                             ,
a.cc:12:29: error: expected identifier before '/' token
a.cc: In lambda function:
a.cc:12:32: error: expected '{' before ';' token
   12 |             a_divisior += [a/i];
      |                                ^
a.cc: In function 'int main()':
a.cc:18:13: error: 'b_divisior' was not declared in this scope; did you mean 'b_divisor'?
   18 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
a.cc:18:29: error: expected ',' before '/' token
   18 |             b_divisior += [b/i];
      |                             ^
      |                             ,
a.cc:18:29: error: expected identifier before '/' token
a.cc: In lambda function:
a.cc:18:32: error: expected '{' before ';' token
   18 |             b_divisior += [b/i];
      |                                ^
a.cc: In function 'int main()':
a.cc:25:9: error: 'j' was not declared in this scope
   25 |         j = 0;
      |         ^
a.cc:27:18: error: invalid types 'int[int]' for array subscript
   27 |             if (a[i] == b[j]){
      |                  ^
a.cc:28:24: error: invalid types 'int[int]' for array subscript
   28 |                 ans = a[i];
      |                        ^
a.cc:37:2: error: expected 'while' at end of input
   37 | }
      |  ^
a.cc:37:2: error: expected '(' at end of input
   37 | }
      |  ^
      |  (
a.cc:37:2: error: expected primary-expression at end of input
a.cc:37:2: error: expected ')' at end of input
   37 | }
      |  ^
      |  )
a.cc:37:2: error: expected ';' at end of input
   37 | }
      |  ^
      |  ;
a.cc:37:2: error: expected '}' at end of input
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include "stdafx.h"
#include "iostream"
using namespace std;

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

int main()
{
	int a, b;
	cin >> a >> b;
	if (a > b)
	{
		int s = a;
		a = b;
		b = s;
	}
	cout << del(a, b);
    return 0;
}

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

#include "stdafx.h"
#include "iostream"
using namespace std;

int del(int a, int b)
{
	if (b == 0 || a==0) return a;
	else return del(b,a%b);
}

int main()
{
	int a, b;
	cin >> a >> b;
	if (a > b)
	{
		int s = a;
		a = b;
		b = s;
	}
	cout << del(a, b);
    return 0;
}

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

#include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;

int main () {
  int x, y, ans;
  cin >> x >> y;

  while (1) {
    if (x >= y) {
      ans = y;
      x = x % y;
      if (x == 0) {
        break;
      }
    } else if {
      ans = x;
      y = y % x;
      if (y == 0)
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: expected '(' before '{' token
   19 |     } else if {
      |               ^
      |               (
a.cc: At global scope:
a.cc:27:3: error: 'cout' does not name a type
   27 |   cout << ans << endl;
      |   ^~~~
a.cc:28:3: error: expected unqualified-id before 'return'
   28 |   return 0;
      |   ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;

int main () {
  int x, y, ans;
  cin >> x >> y;

  while (1) {
    if (x >= y) {
      ans = y;
      x = x % y;
      if (x == 0) {
        break;
      }
    } else {
      ans = x;
      y = y % x;
      if (y == 0)
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

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

#include<studio.h>

int gcd (int x,int y){
if(x<y){
int t=x;
x=y;
y=t;
}

int a;
while(y>0){
a=x%y;
x=y;
y=r;
}
return x;
}

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

#include <iostream>
using namespace std;

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

int main() {
    int n, x;
    cin >> x >> y;
    cout << GCD( x, y ) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'y' was not declared in this scope
   11 |     cin >> x >> y;
      |                 ^
Language: C++

#include <stdio.h>

int main (void)
{

int x,y,s,r;

scanf("%d %d\n",&x,&y);

if(x < y){
  s = x;
  x = y;
  y = s;
}

r = x % y;
while(r! = 0){
  x = y;
  b = r;
  r = x;
}
  
  printf("%d\n",y);

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: expected ')' before '!' token
   17 | while(r! = 0){
      |      ~ ^
      |        )
a.cc:17:10: error: expected primary-expression before '=' token
   17 | while(r! = 0){
      |          ^
Language: C++

import java.util.Scanner;
public class Ex1 {
    public static void main(String[] args) {
        Scanner x = new Scanner(System.in);
        int a = x.nextInt(), b = x.nextInt();

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

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Ex1 {
      | ^~~~~~
Language: C++

// ALDS_1_1_B.cpp
// Greatest Common Divisor

#include <cstdio>
using namespace std;

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

int main()
{
	int a, b;
	scanf("%d %d", &a, &b);
	int c = gcd(a, b);
	printf("%d\n", c);
	return 0;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:9:12: error: expected '(' before 'a'
    9 |         if a >= b
      |            ^
      |            (
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else
      |         ^~~~
Language: C++

 #include <iostream>
    using namespace std;
     
    void main()
    {
        int x = 24;
        int y = 18;
        int temp;
        for(int i = 2; i<y; i++)
        {
            if(x%i == 0 >> y%i == 0)
            {
                //cout<<i<<endl;
                
            temp = i;    
            }        
                
        }
     
        cout<<temp<<endl;
     
    }

Compiler output:
a.cc:4:5: error: '::main' must return 'int'
    4 |     void main()
      |     ^~~~
Language: C++

#include <cmath>
#include <iostream>
using namespace std;
int nod(int a, int b)
{
int max;
max = 1;
int min;
if (a >= b)
min = b;
else
min = a;
for (int j = 1; j <= min; j++)
{
if (a%j == 0 && b%j == 0)
max = j;
}
return max;
}
int main()
{
int a,b;
cin >> a >> b;
cout << nod(a,b);
return 0;
}#include <cmath>
#include <iostream>
using namespace std;
int nod(int a, int b)
{
int max;
max = 1;
int min;
if (a >= b)
min = b;
else
min = a;
for (int j = 1; j <= min; j++)
{
if (a%j == 0 && b%j == 0)
max = j;
}
return max;
}
int main()
{
int a,b;
cin >> a >> b;
cout << nod(a,b);
return 0;
}

Compiler output:
a.cc:26:2: error: stray '#' in program
   26 | }#include <cmath>
      |  ^
a.cc:26:3: error: 'include' does not name a type
   26 | }#include <cmath>
      |   ^~~~~~~
a.cc:29:5: error: redefinition of 'int nod(int, int)'
   29 | int nod(int a, int b)
      |     ^~~
a.cc:4:5: note: 'int nod(int, int)' previously defined here
    4 | int nod(int a, int b)
      |     ^~~
a.cc:45:5: error: redefinition of 'int main()'
   45 | int main()
      |     ^~~~
a.cc:20:5: note: 'int main()' previously defined here
   20 | int main()
      |     ^~~~
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int x=scan.nextInt();
		int y=scan.nextInt();
		int GCD=0;
		while(x%y!=0){
			if(x>=y){
				x=x%y;
				GCD=x;
			}
			else{
				y=y%x;
				GCD=y;
			}
		}
		System.out.println(GCD);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>

int main() {
    int x, y;
    std::cin >> x >> y;
    std::cout << __gcd(x,y) << std::endl;
    return0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: '__gcd' was not declared in this scope
    6 |     std::cout << __gcd(x,y) << std::endl;
      |                  ^~~~~
a.cc:7:5: error: 'return0' was not declared in this scope
    7 |     return0;
      |     ^~~~~~~
Language: C++

#include<iostream>

int main() {
    int x, y;
    std::cin >> x >> y;
    std::cout << __gcd(x,y) << std::endl;
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: '__gcd' was not declared in this scope
    6 |     std::cout << __gcd(x,y) << std::endl;
      |                  ^~~~~
Language: C++

#include<iostream>
#include<algorithm>

int main() {
    int x, y;
    std::cin >> x >> y;
    std::cout << __gcd(x,y) << std::endl;
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: '__gcd' was not declared in this scope; did you mean 'std::__gcd'?
    7 |     std::cout << __gcd(x,y) << std::endl;
      |                  ^~~~~
      |                  std::__gcd
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: 'std::__gcd' declared here
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
Language: C++

#include<iostream>

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

int main() {
    int x, y, swp;
    std::cin >> x >> y;
    if( x < y ){
        swp = x;
        x = y;
        y = x;
    } 
    std::cout << gcd(x,y) << std::endl;
    return 0; 
}

Compiler output:
a.cc:3:1: error: 'inf' does not name a type; did you mean 'int'?
    3 | inf gcd(int x, int y){
      | ^~~
      | int
a.cc: In function 'int main()':
a.cc:19:18: error: 'gcd' was not declared in this scope
   19 |     std::cout << gcd(x,y) << std::endl;
      |                  ^~~
Language: C++

public class Main {
 
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        long x=scan.nextInt();
        long y=scan.nextInt();
        long GCD=x;
        while(x%y!=0){
            if(x>=y){
                x=x%y;
                GCD=x;
            }
            else{
                y=y%x;
                GCD=y;
            }
        }
        System.out.println(GCD);
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main {
      | ^~~~~~
Language: C++

# coding:utf-8
def gcd(x,y):
    if x == y:
        print x
        return
    else if x < y:
        t = x
        x = y
        y = t
    a = x % y
    y_ans = []
    two_ans = []
    for i in range(1,y + 1):
        if y % i == 0:
            y_ans.append(i)
    for i in range(1,a + 1):
        if a % i == 0:
            two_ans.append(i)
    yset = set(y_ans)
    twoset = set(two_ans)
    matched = list(yset & twoset)
    print max(matched) 

n = map(int, raw_input().split())
gcd(n[0],n[1])

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding:utf-8
      |   ^~~~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def gcd(x,y):
      | ^~~
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	int x, y;
	int remainder;
	int ans;
	cin >> x >> y;
	if (x<y) {
		int t = x;
		x = y;
		y = t;
	}
	remainder = x % y;
	if (x == y) cout << x << endl;
	else if{
		for (int i = 1; i <= remainder; i++) {
			if (remainder%i == 0) {
				if (y%i == 0) ans = i;
			}
		}
		cout << ans << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected '(' before '{' token
   19 |         else if{
      |                ^
      |                (
Language: C++

#include<stdio.h>
int main (){
    int a,b;
    scanf("%d%d",&a,&b);
    int x=0;
    if(b>a)
    {
        x=a,a=b,b=x;
    }
    else;
    
    int z=b;
    while(a%b!=0){
        z=a%b;
        a=b;
        b=z;
    }
    prinf("%d\n",z);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   18 |     prinf("%d\n",z);
      |     ^~~~~
      |     printf
Language: C++

int maxCom(int x, int y) {
	int max = 1;
	for (int i = 1; i <= ((x > y) ? y : x); i++) {
		if (x%i == 0 && y%i == 0) {
			if (max < i) max = i;
		}
	}
	return max;
}

int main(void){
	int x, y;
	cin >> x >> y;

	int max = maxCom(x, y);

	cout << max;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> x >> y;
      |         ^~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << max;
      |         ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'unsigned int euclidean_gcd(unsigned int, unsigned int)':
a.cc:3:13: error: 'swap' was not declared in this scope
    3 |     if(a<b) swap(a,b);
      |             ^~~~
Language: C++

#include<iostream.h>

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

int main()
{
    int x,y;
    cin >> x;
    cin >> y;
    cout << gcd(x,y) <<"\n";
    return 0;
}



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

#include<iostream>

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

int main()
{
    int x,y;
    cin >> x;
    cin >> y;
    cout << gcd(x,y) <<"\n";
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   18 |     cin >> x;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |     cout << gcd(x,y) <<"\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

def GCD(x,y):

    if(x >= y):
        z = y
        w = x%y
    else:
        z = x
        w = y%x

    if(not(w == 0)):
        return GCD(z,w)
    else:
        return z

A = [int() for i in input().split()]
print(GCD(A[0],A[1]))

"""実行結果

100 55
5



66 77
11

"""



Compiler output:
a.cc:18:3: warning: missing terminating " character
   18 | """実行結果
      |   ^
a.cc:18:3: error: missing terminating " character
   18 | """実行結果
      |   ^~~~~~~~~
a.cc:28:3: warning: missing terminating " character
   28 | """
      |   ^
a.cc:28:3: error: missing terminating " character
a.cc:1:1: error: 'def' does not name a type
    1 | def GCD(x,y):
      | ^~~
Language: C++


import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args){
		solve();
	}

	public static void solve(){
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		if(x<y){
			int tmp = x;
			x = y;
			y = tmp;
		}

		while(true){
			int a = x % y;
			if(a==0){
				break;
			}
			x = y;
			y = a;
		}

		System.out.println(y);
	}
}




Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:6:33: error: 'String' has not been declared
    6 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:6:42: error: expected ',' or '...' before 'args'
    6 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:10:15: error: expected ':' before 'static'
   10 |         public static void solve(){
      |               ^~~~~~~
      |               :
a.cc:31:2: error: expected ';' after class definition
   31 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::solve()':
a.cc:11:17: error: 'Scanner' was not declared in this scope
   11 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:12:25: error: 'sc' was not declared in this scope
   12 |                 int x = sc.nextInt();
      |                         ^~
a.cc:29:17: error: 'System' was not declared in this scope
   29 |                 System.out.println(y);
      |                 ^~~~~~
Language: C++

#include<stdio.h>

int main(void)
{

	int x, y, d;

	scanf_s("%d", &x);
	scanf_s("%d", &y);

	d = x % y;

	while (d != 0) {

		x = y;
		y = d;
		d = x % y;
	}
	printf("%d", y);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &x);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>

int main(void)
{

	int x, y, d;

	scanf_s("%d", &x);
	scanf_s("%d", &y);

	d = x % y;

	while (d != 0) {

		x = y;
		y = d;
		d = x % y;
	}
	printf("%d", y);
	

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &x);
      |         ^~~~~~~
      |         scanf