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

import java.util.Scanner;

public class GreatestCommonDivisor {

    public int gcd(int a, int b)
    {
        if(a == 0 || b == 0) return a+b; // base case
        return gcd(b,a%b);
    }

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt();

        System.out.println(gcd(a,b));


    }
}



Compiler output:
Main.java:3: error: class GreatestCommonDivisor is public, should be declared in a file named GreatestCommonDivisor.java
public class GreatestCommonDivisor {
       ^
Main.java:16: error: non-static method gcd(int,int) cannot be referenced from a static context
        System.out.println(gcd(a,b));
                           ^
2 errors
Language: Java

public class GreatestCommonDivisor {   
 public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt();

        
        while(a!=0 && b!=0) // until either one of them is 0
        {
            int c = b;
            b = a%b;
            a = c;
        }

        System.out.println(a + b);


    }
}


Compiler output:
Main.java:1: error: class GreatestCommonDivisor is public, should be declared in a file named GreatestCommonDivisor.java
public class GreatestCommonDivisor {   
       ^
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class GreatestCommonDivisor
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class GreatestCommonDivisor
3 errors
Language: Java

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt();

        while(a!=0 && b!=0) // until either one of them is 0
        {
            int c = b;
            b = a%b;
            a = c;
        }

        System.out.println(a + b);


    }


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

import java.util.Scanner;

public class GreatestCommonDivisor {


    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt();

        while(a!=0 && b!=0) // until either one of them is 0
        {
            int c = b;
            b = a%b;
            a = c;
        }

        System.out.println(a + b);


    }
}



Compiler output:
Main.java:3: error: class GreatestCommonDivisor is public, should be declared in a file named GreatestCommonDivisor.java
public class GreatestCommonDivisor {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main101b {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader br = new BufferedReader(new FileReader("sample.txt"));
		StringTokenizer stk=new StringTokenizer(br.readLine());
		int a=Integer.parseInt(stk.nextToken());
		int b=Integer.parseInt((String)stk.nextElement());
		System.out.println(yakusuu(a,b));
	}
	static int yakusuu(int a,int b){
		if(a>b){int tmp=a;
		a=b;
		b=tmp;
		}
		int t=0;
		for(int i=1;i<=a;i++){
			if((a%i)==0&&(b%i)==0)t=i;
		}
		return t;
	}

}

Compiler output:
Main.java:8: error: class Main101b is public, should be declared in a file named Main101b.java
public class Main101b {
       ^
1 error
Language: Java

public class Main {
  public static void main(String[] args) {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String input = new String(in.readLine());
    String[] inputArr = input.split(" ");
    int x = Integer.parseInt(inputArr[0]);
    int y = Integer.parseInt(inputArr[1]);
    if ( x > y ) {
      int tmp = x;
      x = y;
      y = tmp;
     }
     while ( x > 0 ) {
       int tmp = x;
       x = y % x;
       y = tmp;
     }
     System.out.println(y);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                            ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                                               ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.io.*;

public class Main {
  public static void main(String[] args) {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String input = new String(in.readLine());
    String[] inputArr = input.split(" ");
    int x = Integer.parseInt(inputArr[0]);
    int y = Integer.parseInt(inputArr[1]);
    if ( x > y ) {
      int tmp = x;
      x = y;
      y = tmp;
     }
     while ( x > 0 ) {
       int tmp = x;
       x = y % x;
       y = tmp;
     }
     System.out.println(y);
  }
}

Compiler output:
Main.java:6: error: unreported exception IOException; must be caught or declared to be thrown
    String input = new String(in.readLine());
                                         ^
1 error
Language: Java

import java.util.Random;
public class gcd {
	static int[] arySrchCd(int x, int y, int z){
		int count = 0;
		for(int i = 1;i < z;i++){
			if(x % i == 0 && y % i == 0)
				count++;
		}
		int[] a = new int[count];
		int t = 0;
		for(int i = 1;i < z;i++){
			if(x % i == 0 && y % i == 0){
				a[t] = i;
				t++;
			}
		}
		return a;
	}

	public static void main(String[] args) {
		Random stdIn = new Random();
		int x = stdIn.nextInt(1000000000) + 1;
		int y = stdIn.nextInt(1000000000) + 1;
		int z;
		if(x > y)
			z = y;
		else
			z = x;
		int[] a = arySrchCd(x,y,z);
		int gcd = a[0];
		for(int i = 0;i < a.length;i++){
			if(gcd < a[i])
				gcd = a[i];
		}
		System.out.println(gcd);
	}

}

Compiler output:
Main.java:2: error: class gcd is public, should be declared in a file named gcd.java
public class gcd {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class GCD {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            long a,b,gcd;
            String line = br.readLine();
            StringTokenizer st;
            st=new StringTokenizer(line);
            a=Long.parseLong(st.nextToken());
            b=Long.parseLong(st.nextToken());
            Test t = new Test();
            gcd=t.gcd(a,b);
            System.out.println(gcd);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}

class Test{
    long r;
    long gcd(long a, long b){
        while(true){
            if(a>b){
                a=a-b;
            }else{
                break;
            }
        }
        if(b%a==0){
            r=a;
        }else{
            gcd(b,a);
        }
        return r;
    }
}

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

import java.util.Scanner;

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

	int a,b,c;

	do
	    {
		a = In.nextInt();
		b = In.nextInt();
	    }while(1 >= a && a >= Math.pow(10,9) && 1 >= b && b >= Math.pow(10,9));

	a = a > b ? a:b; 
	b = a < b ? a:b;

	while((c = a%b) != 0)
		    {
			a = b;
			b = c;
		    }
	    
	System.out.println(b);
    }
}

Compiler output:
Main.java:3: error: class gcd is public, should be declared in a file named gcd.java
public class gcd
       ^
1 error
Language: Java

import java.util.Scanner;

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

	int a,b,c;

	do
	    {
		a = In.nextInt();
		b = In.nextInt();
	    }while(1 >= a && a >= Math.pow(10,9) && 1 >= b && b >= Math.pow(10,9));

	a = a > b ? a:b; 
	b = a < b ? a:b;

	while((c = a%b) != 0)
		    {
			a = b;
			b = c;
		    }
	    
	System.out.println(b);
    }
}

Compiler output:
Main.java:3: error: class Gcd is public, should be declared in a file named Gcd.java
public class Gcd
       ^
1 error
Language: Java

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

	int a,b,c;

	do
	    {
		a = In.nextInt();
		b = In.nextInt();
	    }while(1 >= a && a >= Math.pow(10,9) && 1 >= b && b >= Math.pow(10,9));

	a = a > b ? a:b; 
	b = a < b ? a:b;

	while((c = a%b) > 0)
	    {

		a = b;
		b = c;
	    }
	
	System.out.println(b);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
	Scanner In = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
	Scanner In = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import sys
def gcd(a, b):
    while b != a :
        if a > b:
             a -= b 
        elif b > a:
            b -= a
    return a
x,y = map(int, raw_input().split())
a = gcd(x,y)
print a

    
    
    
        
    
    

Compiler output:
Main.java:1: error: '.' expected
import sys
          ^
Main.java:2: error: ';' expected
def gcd(a, b):
   ^
2 errors
Language: Java

public class gcd {
    public static void main(String[] args) {
        Scanner scon = new Scanner(System.in);
        int a = scon.nextInt();
        int b = scon.nextInt();
        int gcd = 1;
        for (int i = 1; i < a; i++){
            if (a%i == 0){
                if (b % i == 0) {
                    gcd = i;
                }
            }
        }
        System.out.print(gcd);
    }
}

Compiler output:
Main.java:1: error: class gcd is public, should be declared in a file named gcd.java
public class gcd {
       ^
Main.java:3: error: cannot find symbol
        Scanner scon = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class gcd
Main.java:3: error: cannot find symbol
        Scanner scon = new Scanner(System.in);
                           ^
  symbol:   class Scanner
  location: class gcd
3 errors
Language: Java

public class gcd {
    public static void main(String[] args) {
        int a = Integer.parseInt(args[0]);
        int b = Integer.parseInt(args[1]);
        int gcd = 1;
        for (int i = 1; i < a; i++){
            if (a%i == 0){
                if (b % i == 0) {
                    gcd = i;
                }
            }
        }
        System.out.print(gcd);
    }
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class GreatestCommonDivisor {
	public static int x;
	public static int y;
	public static int z;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] strArr = br.readLine().split(" ");
		x= Integer.parseInt(strArr[0]);
		y = Integer.parseInt(strArr[1]);
		if(x > y){
			solve(x,y);
		}
		else{
			solve(y,x);
		}
		System.out.println(z);

	}

	public static void solve(int big,int small){
		z = big % small;
		if (z == 0){
			z = small;
		}
		else{
			solve(small,z);
		}

	}

}

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

import java.io.*;

public class ia2{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
//        InputStreamReader isr = new InputStreamReader(System.in);
//        BufferedReader br = new BufferedReader(isr);
//        String buf = br.readLine();
//        int x = Integer.parseInt(buf);
        int x = Integer.parseInt(input[0]);
        int y = Integer.parseInt(input[1]);
        System.out.println(gcd(x,y));
    }
    
    static int gcd(int x, int y){
        int a = Math.max(x, y);
        int b = Math.min(x, y);
        
        while(b > 0){
            int c = a % b;
            a = b;
            b = c;
        }
        return a;
    }

}

Compiler output:
Main.java:3: error: class ia2 is public, should be declared in a file named ia2.java
public class ia2{
       ^
1 error
Language: Java

import java.util.Scanner;

public class GCD {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num1 = Integer.parseInt(s.next());
		int num2 = Integer.parseInt(s.next());
		int sub;
		
		if(num2 > num1){
			sub = num2;
			num2 = num1;
			num1 = sub;
		}
		
		System.out.println(num1 != num2 ? gcd(num1, num2) : num1);
	}
	
	public static int gcd(int num1, int num2){
		int sub = num1;
		num1 = Math.max(num1 - num2, num2);
		num2 = Math.min(sub - num2, num2);
		if(num1 != num2){
			return gcd(num1, num2);
		}else{
			return num2;
		}
	}

}

Compiler output:
Main.java:3: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
       ^
1 error
Language: Java

import java.util.*;
import java.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	public static int gcd(x, y){
		int r;
		if(x < y)swap(x, y);
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	public static int gcdB(x, y){
		int n = min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:16: error: <identifier> expected
	public static int gcd(x, y){
	                       ^
Main.java:16: error: <identifier> expected
	public static int gcd(x, y){
	                          ^
Main.java:27: error: <identifier> expected
	public static int gcdB(x, y){
	                        ^
Main.java:27: error: <identifier> expected
	public static int gcdB(x, y){
	                           ^
Main.java:30: error: ')' expected
			if((x % d == 0) && (y % d == 0){
			                               ^
5 errors
Language: Java

import java.util.*;
import java.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	static int gcd(x, y){
		int r;
		if(x < y)swap(x, y);
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	static int gcdB(x, y){
		int n = min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0)){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:16: error: <identifier> expected
	static int gcd(x, y){
	                ^
Main.java:16: error: <identifier> expected
	static int gcd(x, y){
	                   ^
Main.java:27: error: <identifier> expected
	static int gcdB(x, y){
	                 ^
Main.java:27: error: <identifier> expected
	static int gcdB(x, y){
	                    ^
4 errors
Language: Java

import java.util.*;
import java.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	public static int gcd(int x, int  y){
		int r;
		if(x < y)swap(x, y);
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	public static int gcdB(int x, int y){
		int n = min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0)){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:2: error: package java.Math does not exist
import java.Math.*;
^
Main.java:18: error: cannot find symbol
		if(x < y)swap(x, y);
		         ^
  symbol:   method swap(int,int)
  location: class Main
Main.java:28: error: cannot find symbol
		int n = min(x, y);
		        ^
  symbol:   method min(int,int)
  location: class Main
3 errors
Language: Java

import java.util.*;
import java.lang.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	public static int gcd(int x, int  y){
		int r;
		if(x < y)swap(x, y);
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	public static int gcdB(int x, int y){
		int n = min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0)){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:18: error: cannot find symbol
		if(x < y)swap(x, y);
		         ^
  symbol:   method swap(int,int)
  location: class Main
Main.java:28: error: cannot find symbol
		int n = min(x, y);
		        ^
  symbol:   method min(int,int)
  location: class Main
2 errors
Language: Java

import java.util.*;
import java.lang.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	public static int gcd(int x, int  y){
		int r;
		if(x < y)Math.swap(x, y);
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	public static int gcdB(int x, int y){
		int n = Math.min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0)){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:18: error: cannot find symbol
		if(x < y)Math.swap(x, y);
		             ^
  symbol:   method swap(int,int)
  location: class Math
1 error
Language: Java

import java.util.*;
import java.lang.Math.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int x = scan.nextInt();
		int y = scan.nextInt();
		int gcd;
		gcd = gcd(x, y);
		System.out.println(gcd);
	}

	public static int gcd(int x, int  y){
		int r;
		if(x < y){
			int tmp = x;
			x = y;
			y = tmp;
		}
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}

	public static int gcdB(int x, int y){
		int n = Math.min(x, y);
		for(int d = n; d > 0; d--){
			if((x % d == 0) && (y % d == 0)){
				return d;
			}
		}
	}
}

Compiler output:
Main.java:38: error: missing return statement
	}
	^
1 error
Language: Java

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

    public static void main(String[] args){
        int a = Integer.parseInt(args[0]);
        int b = Integer.parseInt(args[1]);
        System.out.println(gcd(a, b));
    }
}

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

import java.io.*;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
        int a = Integer.parseInt(input[0]);
        int b = Integer.parseInt(input[1]);

        System.out.println(GCD(a, b));
    }

    public static int GCD (int a, int b) {
        if (a < b) {
            int temp = a;
            a = b;
            b = temp;
        }
        if (x % y == 0) return y;
        else return GCD (y, x%y);
    }
}

Compiler output:
Main.java:19: error: cannot find symbol
        if (x % y == 0) return y;
            ^
  symbol:   variable x
  location: class Main
Main.java:19: error: cannot find symbol
        if (x % y == 0) return y;
                ^
  symbol:   variable y
  location: class Main
Main.java:19: error: cannot find symbol
        if (x % y == 0) return y;
                               ^
  symbol:   variable y
  location: class Main
Main.java:20: error: cannot find symbol
        else return GCD (y, x%y);
                         ^
  symbol:   variable y
  location: class Main
Main.java:20: error: cannot find symbol
        else return GCD (y, x%y);
                            ^
  symbol:   variable x
  location: class Main
Main.java:20: error: cannot find symbol
        else return GCD (y, x%y);
                              ^
  symbol:   variable y
  location: class Main
6 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int x = scan.nextInt();
		int y = scan.nextInt();

		System.out.printf("%d\n", gcd(x, y));
	}

	public static int gcd(int x, int y){
		if(x < y){
			int work = y;
			y = x;
			x = work;
		}
		while(y > 0){
			r = x % y;
			x = y;
			y = r;
		}
		return x;
	}
}

Compiler output:
Main.java:20: error: cannot find symbol
			r = x % y;
			^
  symbol:   variable r
  location: class Main
Main.java:22: error: cannot find symbol
			y = r;
			    ^
  symbol:   variable r
  location: class Main
2 errors
Language: Java

import java.io.*;

class Main{
    public static void main(String[] args)[
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);

        String[] S = br.readLine().spilt(" ", 0);
        int x = Integer.parseInt(S[0]);
        int y = Integer.parseInt(S[1]);
        int i

        if(x<=y){
            i = y%x;
            while(i!=0){
                y = x;
                x = i;
                i = y%x;
            }
            System.out.println(x);
        }else{
            i = x%y;
            while(i!=0){
                x = y;
                y = i;
                i = x%y;
            }
            System.out.println(y);
        }
    }
}

Compiler output:
Main.java:4: error: ';' expected
    public static void main(String[] args)[
                                          ^
Main.java:11: error: ';' expected
        int i
             ^
Main.java:13: error: <identifier> expected
        if(x<=y){
            ^
Main.java:13: error: <identifier> expected
        if(x<=y){
               ^
Main.java:21: error: illegal start of type
        }else{
         ^
Main.java:31: error: class, interface, enum, or record expected
}
^
6 errors
Language: Java

import java.io.*;
 
class Main{
    public static void main(String[] args) throws IOException[
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
 
        String[] S = br.readLine().spilt(" ", 0);
        int x = Integer.parseInt(S[0]);
        int y = Integer.parseInt(S[1]);
        int i
 
        if(x<=y){
            i = y%x;
            while(i!=0){
                y = x;
                x = i;
                i = y%x;
            }
            System.out.println(x);
        }else{
            i = x%y;
            while(i!=0){
                x = y;
                y = i;
                i = x%y;
            }
            System.out.println(y);
        }
    }
}

Compiler output:
Main.java:4: error: ';' expected
    public static void main(String[] args) throws IOException[
                                                             ^
Main.java:11: error: ';' expected
        int i
             ^
Main.java:13: error: <identifier> expected
        if(x<=y){
            ^
Main.java:13: error: <identifier> expected
        if(x<=y){
               ^
Main.java:21: error: illegal start of type
        }else{
         ^
Main.java:31: error: class, interface, enum, or record expected
}
^
6 errors
Language: Java

import java.io.*;
 
class Main{
    public static void main(String[] args){
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
 
        String[] S = br.readLine().spilt(" ", 0);
        int x = Integer.parseInt(S[0]);
        int y = Integer.parseInt(S[1]);
        int i;
 
        if(x<=y){
            i = y%x;
            while(i!=0){
                y = x;
                x = i;
                i = y%x;
            }
            System.out.println(x);
        }else{
            i = x%y;
            while(i!=0){
                x = y;
                y = i;
                i = x%y;
            }
            System.out.println(y);
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        String[] S = br.readLine().spilt(" ", 0);
                                  ^
  symbol:   method spilt(String,int)
  location: class String
1 error
Language: Java

import java.io.*;
  
class Main{
    public static void main(String[] args){
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
  
        String[] S = br.readLine().spilt(" ");
        int x = Integer.parseInt(S[0]);
        int y = Integer.parseInt(S[1]);
        int i;
  
        if(x<=y){
            i = y%x;
            while(i!=0){
                y = x;
                x = i;
                i = y%x;
            }
            System.out.println(x);
        }else{
            i = x%y;
            while(i!=0){
                x = y;
                y = i;
                i = x%y;
            }
            System.out.println(y);
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        String[] S = br.readLine().spilt(" ");
                                  ^
  symbol:   method spilt(String)
  location: class String
1 error
Language: Java

import java.io.*;
   
class Main{
    public static void main(String[] args) throws IOException{
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
   
        String[] S = br.readLine().spilt(" ");
        int x = Integer.parseInt(S[0]);
        int y = Integer.parseInt(S[1]);
        int i;
   
        if(x<=y){
            i = y%x;
            while(i!=0){
                y = x;
                x = i;
                i = y%x;
            }
            System.out.println(x);
        }else{
            i = x%y;
            while(i!=0){
                x = y;
                y = i;
                i = x%y;
            }
            System.out.println(y);
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        String[] S = br.readLine().spilt(" ");
                                  ^
  symbol:   method spilt(String)
  location: class String
1 error
Language: Java

import java.util.Scanner;

public class ALDS_B {

	public static void main(String[] args) {

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

			//2???????????¶??°???????????????
			int numX = sc.nextInt();
			int numY = sc.nextInt();

			//0??????????????§??????????±???????
			int output = 0;
			int checkNum = 0;
			do {
				output = checkNum;
				//??°????????????
				if (numX >= numY) {
					checkNum = numX % numY;
					numX = checkNum;
				}else{
					checkNum = numY % numX;
					numY = checkNum;
				}
			} while (checkNum != 0);
			//???????????????
			System.out.println(output);
		}catch (Exception e) {
			System.out.println(e);
		} finally {
			if (sc != null) {
				sc.close();
			}
		}
	}

}

Compiler output:
Main.java:3: error: class ALDS_B is public, should be declared in a file named ALDS_B.java
public class ALDS_B {
       ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

			//2???????????¶??°???????????????
			int numX = sc.nextInt();
			int numY = sc.nextInt();

			//0??????????????§??????????±???????
			int output = 0;
			int checkNum = 0;
			do {
				output = checkNum;
				//??°????????????
				if (numX >= numY) {
					checkNum = numX % numY;
					numX = checkNum;
				}else{
					checkNum = numY % numX;
					numY = checkNum;
				}
			} while (checkNum != 0);
			//???????????????
			System.out.println(output);
		}catch (Exception e) {
			System.out.println(e);
		} finally {
			if (sc != null) {
				sc.close();
			}
		}
	}

}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = null;
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
			sc = new Scanner(System.in);
			         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class ALDS_B {

	public static void main(String[] args) {

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

			//2???????????¶??°???????????????
			int numX = sc.nextInt();
			int numY = sc.nextInt();

			//0??????????????§??????????±???????
			int output = 0;
			int checkNum = 0;
			do {
				output = Math.max(numX, numY);
				//??°????????????
				if (numX >= numY) {
					checkNum = numX % numY;
					numX = checkNum;
				}else{
					checkNum = numY % numX;
					numY = checkNum;
				}
			} while (checkNum != 0);
			//???????????????
			System.out.println(output);
		}catch (Exception e) {
			System.out.println(e);
		} finally {
			if (sc != null) {
				sc.close();
			}
		}
	}

}

Compiler output:
Main.java:3: error: class ALDS_B is public, should be declared in a file named ALDS_B.java
public class ALDS_B {
       ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) {
                Scanner sc = new Scanner();
                int i = sc.nexInt();
                int j = sc.nextInt();
		System.out.println(getGDC(i, j));
	}

	private static int getGDC(int i, int j) {
		if (j == 0) return i;
		return getGDC(j, i % j);
	}
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
                Scanner sc = new Scanner();
                             ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
Main.java:6: error: cannot find symbol
                int i = sc.nexInt();
                          ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
2 errors
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
                Scanner sc = new Scanner();
                int i = sc.nexInt();
                int j = sc.nextInt();
        System.out.println(getGDC(i, j));
    }
 
    private static int getGDC(int i, int j) {
        if (j == 0) return i;
        return getGDC(j, i % j);
    }
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
                Scanner sc = new Scanner();
                             ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
Main.java:6: error: cannot find symbol
                int i = sc.nexInt();
                          ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
2 errors
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
                Scanner sc = new Scanner(System.in);
                int i = sc.nexInt();
                int j = sc.nextInt();
        System.out.println(getGDC(i, j));
    }
 
    private static int getGDC(int i, int j) {
        if (j == 0) return i;
        return getGDC(j, i % j);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
                int i = sc.nexInt();
                          ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.*;
public class Main {
	static Scanner sc = new Scanner (System.in);
	public static void main (String[] args) {
		GCF calc = new GCF(); 
		long a = sc.nextLong();
		long b = sc.nextLong();
		System.out.println(calc.GCF(a, b));
	}	
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		GCF calc = new GCF(); 
		^
  symbol:   class GCF
  location: class Main
Main.java:5: error: cannot find symbol
		GCF calc = new GCF(); 
		               ^
  symbol:   class GCF
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main {
	static Scanner sc = new Scanner (System.in);
	public static void main (String[] args) {
		Main calc = new Main(); 
		long a = sc.nextLong();
		long b = sc.nextLong();
		System.out.println(calc.Main(a, b));
	}	
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		System.out.println(calc.Main(a, b));
		                       ^
  symbol:   method Main(long,long)
  location: variable calc of type Main
1 error
Language: Java


import java.util.*;
public class Main {
	static Scanner sc = new Scanner (System.in);
	public static void main (String[] args) {
		Main calc = new GCF(); 
		long a = sc.nextLong();
		long b = sc.nextLong();
		System.out.println(calc.GCF(a, b));
	}	
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		Main calc = new GCF(); 
		                ^
  symbol:   class GCF
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		if(b > a){
			int temp = a;
			a = b; 
			b = temp;
		}

		if(a == b){
			System.out.println(b);
		}

		while(a % b != 0){
			temp = b;
			b = a % b;
			a = temp;
		}

		System.out.println(b);
		
	}
}

Compiler output:
Main.java:24: error: cannot find symbol
			temp = b;
			^
  symbol:   variable temp
  location: class Main
Main.java:26: error: cannot find symbol
			a = temp;
			    ^
  symbol:   variable temp
  location: class Main
2 errors
Language: Java

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

class Main {

	public static void main(String[] args) {

		Input stdIn = new Input();
		List<Integer> inputline = stdIn.getLine();
		int x = inputline.get(0);
		int y = inputline.get(1);

		List<Integer> xDivisor = new ArrayList<>();
		List<Integer> yDivisor = new ArrayList<>();

		for (int i = 1; i < x; i++) {
			if (x % i == 0) {
				xDivisor.add(i);
			}
		}
		for (int i = 1; i < y; i++) {
			if (y % i == 0) {
				yDivisor.add(i);
			}
		}

		for (int i = xDivisor.size() - 1; i > 0; i--) {
			for (int j = yDivisor.size() - 1; j > 0; j--) {
				if (xDivisor.get(i).equals(yDivisor.get(j))) {
					System.out.println(yDivisor.get(j));
					System.exit(0);
				}
			}
		}
	}
}

class Input{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public Input() {
	}

	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}

	public List<Integer> getLine() {
		try {
			String[] s = br.readLine().trim().split(" ");
			List<Integer> ary = new ArrayList<>();
			for (int i = 0; i < s.length; i++) {
				ary.add(Integer.parseInt(s[i]));
			}
			return ary;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:39: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	^
  symbol:   class BufferedReader
  location: class Input
Main.java:39: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                        ^
  symbol:   class BufferedReader
  location: class Input
Main.java:39: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                                           ^
  symbol:   class InputStreamReader
  location: class Input
Main.java:48: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
Main.java:62: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
Main.java:71: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
6 errors
Language: Java

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

class Main {

	public static void main(String[] args) {

		Input stdIn = new Input();
		List<Integer> inputline = stdIn.getLine();
		int x = inputline.get(0);
		int y = inputline.get(1);

		List<Integer> xDivisor = new ArrayList<>();
		List<Integer> yDivisor = new ArrayList<>();

		for (int i = 1; i < x; i++) {
			if (x % i == 0) {
				xDivisor.add(i);
			}
		}
		for (int i = 1; i < y; i++) {
			if (y % i == 0) {
				yDivisor.add(i);
			}
		}

		for (int i = xDivisor.size() - 1; i > 0; i--) {
			for (int j = yDivisor.size() - 1; j > 0; j--) {
				if (xDivisor.get(i).equals(yDivisor.get(j))) {
					System.out.println(yDivisor.get(j));
					System.exit(0);
				}
			}
		}
	}
}

import java.io.BufferedReader;

class Input{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public Input() {
	}

	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}

	public List<Integer> getLine() {
		try {
			String[] s = br.readLine().trim().split(" ");
			List<Integer> ary = new ArrayList<>();
			for (int i = 0; i < s.length; i++) {
				ary.add(Integer.parseInt(s[i]));
			}
			return ary;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:38: error: class, interface, enum, or record expected
import java.io.BufferedReader;
^
1 error
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.io.BufferedReader;

class Main {

	public static void main(String[] args) {

		Input stdIn = new Input();
		List<Integer> inputline = stdIn.getLine();
		int x = inputline.get(0);
		int y = inputline.get(1);

		List<Integer> xDivisor = new ArrayList<>();
		List<Integer> yDivisor = new ArrayList<>();

		for (int i = 1; i < x; i++) {
			if (x % i == 0) {
				xDivisor.add(i);
			}
		}
		for (int i = 1; i < y; i++) {
			if (y % i == 0) {
				yDivisor.add(i);
			}
		}

		for (int i = xDivisor.size() - 1; i > 0; i--) {
			for (int j = yDivisor.size() - 1; j > 0; j--) {
				if (xDivisor.get(i).equals(yDivisor.get(j))) {
					System.out.println(yDivisor.get(j));
					System.exit(0);
				}
			}
		}
	}
}

class Input{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public Input() {
	}

	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}

	public List<Integer> getLine() {
		try {
			String[] s = br.readLine().trim().split(" ");
			List<Integer> ary = new ArrayList<>();
			for (int i = 0; i < s.length; i++) {
				ary.add(Integer.parseInt(s[i]));
			}
			return ary;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:40: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                                           ^
  symbol:   class InputStreamReader
  location: class Input
Main.java:49: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
Main.java:63: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
Main.java:72: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Input
4 errors
Language: Java

import java.util.List;

class Main {

	public static void main(String[] args) {

		Input stdIn = new Input();
		List<Integer> inputline = stdIn.getLine();
		int x = inputline.get(0);
		int y = inputline.get(1);
		int q,r;

		while(true) {
			q = x / y;
			r = x % y;
			if (r == 0) {
				System.out.println(y);
				break;
			} else {
				x = y;
				y = r;
			}
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

class Input{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public Input() {
	}

	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}

	public List<Integer> getLine() {
		try {
			String[] s = br.readLine().trim().split(" ");
			List<Integer> ary = new ArrayList<>();
			for (int i = 0; i < s.length; i++) {
				ary.add(Integer.parseInt(s[i]));
			}
			return ary;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:27: error: class, interface, enum, or record expected
import java.io.BufferedReader;
^
Main.java:28: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:29: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:30: error: class, interface, enum, or record expected
import java.util.ArrayList;
^
Main.java:31: error: class, interface, enum, or record expected
import java.util.List;
^
5 errors
Language: Java

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:
Main.java:2: error: class Ex1 is public, should be declared in a file named Ex1.java
public class Ex1 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class ALDS1_1_B {
    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:
Main.java:2: error: class ALDS1_1_B is public, should be declared in a file named ALDS1_1_B.java
public class ALDS1_1_B {
       ^
1 error
Language: Java

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:
Main.java:4: error: cannot find symbol
        Scanner scan=new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner scan=new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        while(true){
        int result = a % b;
        if(result == 0){
            System.out.println(b);
            break;
        }else{
            a = b;
            b = result;
        }
        }
    }
}


Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error