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

package aizuonlinejava;

public class Practice {
	
	void practice(int n){
		int a = 0,b = 0,aa,bb,i;
		if(n != 0){
			return;
		}
		for(i = 0; i < n; i++){
			if( a > b){
				aa = a + b;
			}
			else if (a < b){
				bb = a + b;
			}
			else{
				aa = a;
				bb = b;
			}
		}
	}
}

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

import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;

public class Main{

static PrintWriter out;
static InputReader ir;

static void solve(){
 for(;;){
  int n=ir.nextInt();
  if(n==0) break;
  int acnt=0,bcnt=0;
  while(n-->0){
   int a=ir.nextInt();
   int b=ir.nextInt();
   if(a>b) acnt+=a+b;
   else if(a==b){
    acnt+=a;
    bcnt+=b;
   }
   else bcnt+=a+b;
  }
  out.println(acnt+" "+bcnt);
 }
}
}

public static void main(String[] args) throws Exception{
 ir=new InputReader(System.in);
 out=new PrintWriter(System.out);
 solve();
 out.flush();
}

static class InputReader {
 private InputStream in;
 private byte[] buffer=new byte[1024];
 private int curbuf;
 private int lenbuf;

 public InputReader(InputStream in) {this.in=in; this.curbuf=this.lenbuf=0;}
 
 public boolean hasNextByte() {
  if(curbuf>=lenbuf){
   curbuf= 0;
   try{
    lenbuf=in.read(buffer);
   }catch(IOException e) {
    throw new InputMismatchException();
   }
   if(lenbuf<=0) return false;
  }
  return true;
 }

 private int readByte(){if(hasNextByte()) return buffer[curbuf++]; else return -1;}
 
 private boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
 
 private void skip(){while(hasNextByte()&&isSpaceChar(buffer[curbuf])) curbuf++;}
 
 public boolean hasNext(){skip(); return hasNextByte();}

 public int nextInt() {
  if(!hasNext()) throw new NoSuchElementException();
  int c=readByte();
  while (isSpaceChar(c)) c=readByte();
  boolean minus=false;
  if (c=='-') {
   minus=true;
   c=readByte();
  }
  int res=0;
  do{
   if(c<'0'||c>'9') throw new InputMismatchException();
   res=res*10+c-'0';
   c=readByte();
  }while(!isSpaceChar(c));
  return (minus)?-res:res;
 }
}

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

import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;

public class Main{

static PrintWriter out;
static InputReader ir;

static void solve(){
 for(;;){
  int n=ir.nextInt();
  if(n==0) break;
  int acnt=0,bcnt=0;
  while(n-->0){
   int a=ir.nextInt();
   int b=ir.nextInt();
   if(a>b) acnt+=a+b;
   else if(a==b){
    acnt+=a;
    bcnt+=b;
   }
   else bcnt+=a+b;
  }
  out.println(acnt+" "+bcnt);
 }
}
}

public static void main(String[] args) throws Exception{
 ir=new InputReader(System.in);
 out=new PrintWriter(System.out);
 solve();
 out.flush();
}

static class InputReader {
 private InputStream in;
 private byte[] buffer=new byte[1024];
 private int curbuf;
 private int lenbuf;

 public InputReader(InputStream in) {this.in=in; this.curbuf=this.lenbuf=0;}
 
 public boolean hasNextByte() {
  if(curbuf>=lenbuf){
   curbuf= 0;
   try{
    lenbuf=in.read(buffer);
   }catch(IOException e) {
    throw new InputMismatchException();
   }
   if(lenbuf<=0) return false;
  }
  return true;
 }

 private int readByte(){if(hasNextByte()) return buffer[curbuf++]; else return -1;}
 
 private boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
 
 private void skip(){while(hasNextByte()&&isSpaceChar(buffer[curbuf])) curbuf++;}
 
 public boolean hasNext(){skip(); return hasNextByte();}

 public int nextInt() {
  if(!hasNext()) throw new NoSuchElementException();
  int c=readByte();
  while (isSpaceChar(c)) c=readByte();
  boolean minus=false;
  if (c=='-') {
   minus=true;
   c=readByte();
  }
  int res=0;
  do{
   if(c<'0'||c>'9') throw new InputMismatchException();
   res=res*10+c-'0';
   c=readByte();
  }while(!isSpaceChar(c));
  return (minus)?-res:res;
 }
}
}

Compiler output:
Main.java:36: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws Exception{
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:90: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

public class Main{

    public static void main(String[] args) throws Exception{
        BufferedReader bf =new BufferedReader( new InputStreamReader(System.in));
        int n = Integer.parseInt(bf.readLine());
        System.out.println(n);
        while(n != 0) {
            Score s = new Score();
            for (int i = 0; i < n; i++){
                String new_line = bf.readLine();
                String[] data = new_line.split(" ");
                int a = Integer.parseInt(data[0]);
                int b = Integer.parseInt(data[1]);
                s.openCard(a,b);
                //System.out.println("a = " + a + "  b = " + b);
            }
            s.print();
            n = Integer.parseInt(bf.readLine());
        }
        //System.out.print("finish");
    }
}

class Score{
    int A=0 ,B =0;
    public Score(){
    }
    public void openCard(int a, int b){
        if(a>b){
            A += (a+b);
            return;
        }
        if(b > a){
            B += (a+b);
            return;
        }
        A += a;
        B += b;
    }
    public void print(){
        System.out.print(A+" "+B);
    }
}

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

class Main{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args){
		int sca=0,scb=0,a,b,x;
		while((x=Integer.parseInt(s.next()))!=0) {
			sca=0;scb=0;a=0;b=0;
			for(int i=x;i>0;--i) {
				a=Integer.parseInt(s.next());
				b=Integer.parseInt(s.next());
				if(a>b) {
					sca+=a+b;
				}else if(a<b) {
					scb+=a+b;
				}else {
					sca+=a;
					scb+=b;
				}
			}
			System.out.printf("%d %d\n",sca,scb);
		}
	}
}

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

import java.io.*;

public class Main0500{
    
        static int Ap = 0;
        static int Bp = 0;

    public static void main(String[] args){
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        try{
            while(true){
                int a = Integer.parseInt(br.readLine());

                if(a == 0) break;
                
                Ap = Bp = 0;

                for(int i = 0; i < a; i++){
                    String[] tmp = br.readLine().split(" " , 2);
                    int[] points = new int[2];
                    points[0] = Integer.parseInt(tmp[0]);
                    points[1] = Integer.parseInt(tmp[1]);
                    judgement(points);
                }

                System.out.println(Ap + " " + Bp);

            }
        }catch(IOException e){
            e.printStackTrace();
        }

    }

    public static void judgement (int[] p){
        if(p[0] > p[1]){
            Ap += (p[0]+p[1]);
        }else if(p[0] < p[1]){
            Bp += (p[0]+p[1]);
        }else if(p[0] == p[1]){
            Ap += p[0];
            Bp += p[1];
        }
    }
}

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

import java.io.*;

public class main{
    public static void main(String[] args){
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        try{
            while(true){
            int n = Integer.parseInt(bf.readLine());

                if(n == 0){
                    break;
                }
                
                Shobu(n);
            }


        }catch(IOException e){
            System.out.println(e);
        }
    }

    private static void Shobu(int n){
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        try{
            int[] a = new int[n];
            int[] b = new int[n];

            for(int i = 0; i < n; i++){
                String line = bf.readLine();
                String[] strAry = line.split(" ");
                a[i] = Integer.parseInt(strAry[0]);
                b[i] = Integer.parseInt(strAry[1]);
            }

            int a_gou = 0;
            int b_gou = 0;

            for(int i = 0; i < n; i++){
                if(a[i] > b[i]){
                    a_gou += Katimake(a[i], b[i]);
                }else if(a[i] < b[i]){
                    b_gou += Katimake(a[i], b[i]);
                }else{
                    a_gou += Katimake(a[i], b[i]);
                    b_gou += Katimake(a[i], b[i]);
                }
            }

            System.out.println(a_gou + " " + b_gou);
        }catch(IOException e){
            System.out.println(e);
        }
    }

    public static int Katimake(int x, int y){
        if(x == y){
            return x;
        }else{
            return (x + y);
        }
    }
}

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

package jp.co.practice.volume5;

import java.util.Scanner;

public class Question0500 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = Integer.parseInt(sc.nextLine());
		while (0 < times) {
			compare(sc, times);
			times = Integer.parseInt(sc.nextLine());
		}
	}
	
	private static void compare(Scanner sc, int times) {
		int a_total = 0, b_total = 0;
		int counter = 1;
		while (counter <= times) {
			String[] line = sc.nextLine().split(" ");
			int a = Integer.parseInt(line[0]);
			int b = Integer.parseInt(line[1]);
			if (a > b) { a_total += a + b; }
			if (a < b) { b_total += a + b; }
			if (a == b) {
				a_total += a;
				b_total += b;
			}
			counter++;
 		}
		System.out.println(a_total + " " + b_total);
	}
}

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

import java.util.Scanner;

public class Question0500 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = Integer.parseInt(sc.nextLine());
		while (0 < times) {
			compare(sc, times);
			times = Integer.parseInt(sc.nextLine());
		}
	}
	
	private static void compare(Scanner sc, int times) {
		int a_total = 0, b_total = 0;
		int counter = 1;
		while (counter <= times) {
			String[] line = sc.nextLine().split(" ");
			int a = Integer.parseInt(line[0]);
			int b = Integer.parseInt(line[1]);
			if (a > b) { a_total += a + b; }
			if (a < b) { b_total += a + b; }
			if (a == b) {
				a_total += a;
				b_total += b;
			}
			counter++;
 		}
		System.out.println(a_total + " " + b_total);
	}
}

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

import java.util.Scanner;


class Main{
    public static void main(String[] a){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ua = 0;
		int ub = 0;
		for(i=0; i<n; i++) {
			int va = sc.nextInt();
			int vb = sc.nextInt();
			if (va > vb) {
				ua += va+vb;
			} else if (vb > va) {
				ub += va + vb;
			} else {
				ua += va;
				ub += vb;
			}
		}
		System.out.println(ua + " " + ub);
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		for(i=0; i<n; i++) {
		    ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
		for(i=0; i<n; i++) {
		         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
		for(i=0; i<n; i++) {
		              ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java

import java.util.Scanner;


class Main{
    public static void main(String[] a){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if (n != 0) {
			int ua = 0;
			int ub = 0;
			for(int i=0; i<n; i++) {
				int va = sc.nextInt();
				int vb = sc.nextInt();
				if (va > vb) {
					ua += va+vb;
				} else if (vb > va) {
					ub += va + vb;
				} else {
					ua += va;
					ub += vb;
				}
			}
		}
		System.out.println(ua + " " + ub);
	}
}

Compiler output:
Main.java:24: error: cannot find symbol
		System.out.println(ua + " " + ub);
		                   ^
  symbol:   variable ua
  location: class Main
Main.java:24: error: cannot find symbol
		System.out.println(ua + " " + ub);
		                              ^
  symbol:   variable ub
  location: class Main
2 errors
Language: Java

import java.util.Scanner;


class Main{
    public static void main(String[] a){
		Scanner sc = new Scanner(System.in);
		while(0) {
			int n = sc.nextInt();
			if(n == 0) {
				break;
			} else if (n != 0) {
				int ua = 0;
				int ub = 0;
				for(int i=0; i<n; i++) {
					int va = sc.nextInt();
					int vb = sc.nextInt();
					if (va > vb) {
						ua += va+vb;
					} else if (vb > va) {
						ub += va + vb;
					} else if (vb == va) {
						ua += va;
						ub += vb;
					}
				}
				System.out.println(ua + " " + ub);
			}
		}
	}
}

Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to boolean
		while(0) {
		      ^
1 error
Language: Java

import java.util.Scanner;


class Main{
    public static void main(String[] a){
		Scanner sc = new Scanner(System.in);
		while(0) {
			int n = sc.nextInt();
			if(n == 0) {
				break;
			} else if (n != 0) {
				int ua = 0;
				int ub = 0;
				for(int i=0; i<n; i++) {
					int va = sc.nextInt();
					int vb = sc.nextInt();
					if (va > vb) {
						ua += va+vb;
					} else if (vb > va) {
						ub += va + vb;
					} else {
						ua += va;
						ub += vb;
					}
				}
				System.out.println(ua + " " + ub);
			}
		}
	}
}

Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to boolean
		while(0) {
		      ^
1 error
Language: Java

public class problem1 {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
        while(true){
            int in = scan.nextInt();
            if(in == 0) return;

            int aSum = 0;
            int bSum = 0;
            for(int i = 0; i < in; i++){
                int a = scan.nextInt();
                int b = scan.nextInt();
                if(a > b){
                    aSum += a+b;
                }else if(a < b){
                	bSum += a+b;
                }else{
                	aSum += a;
                	bSum += b;
                }
            }
            System.out.println(aSum +" "+ bSum);
        }
	}
}

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

public class pro500 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner in = new Scanner(System.in);

		while (true) {
			int cnt = in.nextInt();
			if(cnt==0)break;
			int i = 0;
			int[] str = new int[cnt * 2];
			while (i < cnt * 2) {
				str[i] = in.nextInt();
				i++;				
			}
			
			int p1=0,p2=0;
			for(int j=0;j<cnt*2;j+=2){
				if(str[j]>str[j+1])p1+=(str[j]+str[j+1]);
				else if(str[j]<str[j+1])p2+=(str[j]+str[j+1]);
				else{
					p1+=str[j];
					p2+=str[j+1];
				}
			}
			System.out.println(p1+" "+p2);
		}
	}
}

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

import java.util.Scanner;

public class pro500 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner in = new Scanner(System.in);

		while (true) {
			int cnt = in.nextInt();
			if(cnt==0)break;
			int i = 0;
			int[] str = new int[cnt * 2];
			while (i < cnt * 2) {
				str[i] = in.nextInt();
				i++;				
			}
			
			int p1=0,p2=0;
			for(int j=0;j<cnt*2;j+=2){
				if(str[j]>str[j+1])p1+=(str[j]+str[j+1]);
				else if(str[j]<str[j+1])p2+=(str[j]+str[j+1]);
				else{
					p1+=str[j];
					p2+=str[j+1];
				}
			}
			System.out.println(p1+" "+p2);
		}
	}
}

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

import java.util.Scanner;

public class main {
	main(){
		Scanner in= new Scanner(System.in);
		int a=0,b=0,temp1,temp2;
		for(int i=0;i<in.nextInt();i++){
			temp1=in.nextInt();
			temp2=in.nextInt();
			if(temp1>temp2){
				a+=temp1+temp2;
			}
			else if(temp1==temp2){
				a+=temp1;b=a+=temp2;
			}
			else{
				b+=temp1+temp2;
			}
		}
		System.out.printf("%d %d\n",a,b);
	}
}

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

import java.util.Scanner;

public class main {
	public static void main(){
		Scanner in= new Scanner(System.in);
		int a=0,b=0,temp1,temp2;
		for(int i=0;i<in.nextInt();i++){
			temp1=in.nextInt();
			temp2=in.nextInt();
			if(temp1>temp2){
				a+=temp1+temp2;
			}
			else if(temp1==temp2){
				a+=temp1;b=a+=temp2;
			}
			else{
				b+=temp1+temp2;
			}
		}
		System.out.printf("%d %d\n",a,b);
	}
}

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

public class Main {
	public static void main(String[] args){
		Scanner in= new Scanner(System.in);
		int a=0,b=0,temp1,temp2,j;
		j=in.nextInt();
		while(j!=0){
		for(int i=0;i<in.nextInt();i++){
			temp1=in.nextInt();
			temp2=in.nextInt();
			if(temp1>temp2){
				a+=temp1+temp2;
			}
			else if(temp1==temp2){
				a+=temp1;b=a+=temp2;
			}
			else{
				b+=temp1+temp2;
			}
		}
		System.out.printf("%d %d\n",a,b);
		j=in.nextInt();
		}
	}
}

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

import java.util.ArrayList;
import java.util.Scanner;
import java.util.Stack;

public class Test {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n;
		while((n=scanner.nextInt())>0){
			int a=0,b=0;
			for(int i=0;i<n;i++){
				int aa=scanner.nextInt(),bb=scanner.nextInt();
				if(aa>bb)a+=aa+bb;
				else if(aa<bb)b+=aa+bb;
				else {a+=aa;b+=bb;}
			}
			System.out.println(a + " "+b);
		}
	}
}

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

import java.util.Scanner;

public class Exp {
	public static void main(String[] args) {
		int size;
		int A = 0;
		int B = 0;
		int i = 0;
		Scanner scan = new Scanner(System.in);
		while(true){
			while(true){
				if(scan.hasNext() == true){
					size = scan.nextInt();
					break;
				}
			}
			int[] arr = new int[size * 2];
			while(i < 2 * size){
				if(scan.hasNext() ==  true){
					arr[i] = scan.nextInt();
					i++;
				}
			}
			i = 0;
			while(i < 2 * size){
				if(arr[i] < arr[i + 1]){
					B += (arr[i] + arr[i + 1]);
				}
				else if(arr[i] > arr[i + 1]){
					A += (arr[i] + arr[i + 1]);
				}
				else{
					A += arr[i];
					B += arr[i];
				}
				i += 2;
			};
		System.out.println(A + " " + B);
		}
	}
}

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

import java.util.Scanner;

public class Exp {
	public static void main(String[] args) {
		int size = 1;
		int A = 0;
		int B = 0;
		int i = 0;
		int[] arr;
		Scanner scan = new Scanner(System.in);
		while(size != 0){
			while(true){
				if(scan.hasNext() == true){
					A = 0;
					B = 0;
					size = scan.nextInt();
					break;
				}
			}
			arr = new int[size * 2];
			i = 0;
			while(i < 2 * size){
				if(scan.hasNext() ==  true){
					arr[i] = scan.nextInt();
					i++;
				}
			}
			i = 0;
			while(i < 2 * size){
				if(arr[i] < arr[i + 1]){
					B += (arr[i] + arr[i + 1]);
				}
				else if(arr[i] > arr[i + 1]){
					A += (arr[i] + arr[i + 1]);
				}
				else{
					A += arr[i];
					B += arr[i];
				}
				i += 2;
			}
			System.out.println(A + " " + B);
		}
		
	}
}

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

import java.util.Scanner;

public class Game {
	private int a = 0;
	private int b = 0;
	
	void play(int _a, int _b) {
		if (_a < _b) {
			b += _a + _b;
		} else if (_a > _b) {
			a += _a + _b;
		} else {
			a += _a;
			b += _b;
		}
	}

	void printPoint() {
		System.out.println(a + " " + b);
	}
}

public class Main {
	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int data, a, b;
		data = a = b = 0;
		while (true) {
			Game game = new Game();
			try {
				data = stdin.nextInt();
			} catch (Exception e) {
				e.printStackTrace();
				data = 0;
			}
			if (data == 0)
				break;
			
			for (int i = 0; i < data; ++i) {
				try {
					a = stdin.nextInt();
					b = stdin.nextInt();
				} catch (Exception e) {
					e.printStackTrace();
				}
				game.play(a, b);
			}
			game.printPoint();
		}
		stdin.close();
	}
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?

		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNextLine() && sc.nextInt() > 0) {
			
			int n = sc.nextInt();
			
			ArrayList<Game> games = new ArrayList<Game>(n);
			
			for (int i = 0; i < n; i++) {
				games.add((new Game(sc.nextInt(), sc.nextInt())));
			}
			
			int point_a = 0;
			int point_b = 0;
			Iterator<Game> it = games.iterator();
			while (it.hasNext()) {
				Game now = it.next();
				if (now.winner() == Winner.A)
					point_a += now.sum();
				else if (now.winner() == Winner.B)
					point_b += now.sum();
				else {
					point_a += now.a;
					point_b += now.b;
				}

			}
			System.out.println(point_a + " " + point_b);
		}
		
	}

	

}

class Game{
	int a;
	int b;
	
	public  Winner winner() {
		if(a > b) return Winner.A;
		else if(a == b) return Winner.draw;
		else return Winner.B;
	}
	
	public int sum() {
		return a + b;
	}

	public Game(int a, int b) {
		this.a = a;
		this.b = b;
	}
}

Compiler output:
Main.java:53: error: cannot find symbol
	public  Winner winner() {
	        ^
  symbol:   class Winner
  location: class Game
Main.java:30: error: cannot find symbol
				if (now.winner() == Winner.A)
				                    ^
  symbol:   variable Winner
  location: class Main
Main.java:32: error: cannot find symbol
				else if (now.winner() == Winner.B)
				                         ^
  symbol:   variable Winner
  location: class Main
Main.java:54: error: cannot find symbol
		if(a > b) return Winner.A;
		                 ^
  symbol:   variable Winner
  location: class Game
Main.java:55: error: cannot find symbol
		else if(a == b) return Winner.draw;
		                       ^
  symbol:   variable Winner
  location: class Game
Main.java:56: error: cannot find symbol
		else return Winner.B;
		            ^
  symbol:   variable Winner
  location: class Game
6 errors
Language: Java


import java.util.Scanner;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	while( (num = sc.nextInt()) != 0 ){
		int aCnt = 0;
		int bCnt = 0;
		for(int cnt = 0;cnt < num;cnt++){
			int a = sc.nextInt();
			int b = sc.nextInt();
			if( a < b ){
				bCnt += a + b;
			}else if( a > b ){
				aCnt += a + b;
			}else{
				aCnt += a;
				bCnt += b;
			}
		}
		System.out.printf("%d %d\n",aCnt,bCnt);
	}
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
	while( (num = sc.nextInt()) != 0 ){
	        ^
  symbol:   variable num
  location: class Main
Main.java:10: error: cannot find symbol
		for(int cnt = 0;cnt < num;cnt++){
		                      ^
  symbol:   variable num
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class CardGame {
   public static void main(String[] args) {
	  Scanner in = new Scanner(System.in);
	  int cardNum = Integer.parseInt(in.nextLine());
	  int[] aCard = new int[cardNum];
	  int[] bCard = new int[cardNum];
	  
	  for(int i=0; i<cardNum; i++){
	     String[] pCard = in.nextLine().split(" ");
	     aCard[i] = Integer.parseInt(pCard[0]);
	     bCard[i] = Integer.parseInt(pCard[1]);
	     //System.out.println(aCard[i] +  " " + bCard[i]);
	  }
	  
	  match(cardNum,aCard,bCard);	  
   }
   
   public static void match(int n, int[] a, int[] b){
	   int aScore=0;
	   int bScore=0;
	   
	   for(int i = 0; i < n; i++){
		   if(a[i] > b[i]){
			   aScore = aScore + a[i] + b[i];
		   }else if(a[i] == b[i]){
			   aScore = aScore + a[i];
			   bScore = bScore + b[i];
		   }else{
			   bScore = bScore + a[i] + b[i];
		   }
	   }
	   
	   System.out.println(aScore + " " + bScore);
   }
}

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

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

public class CardGame {
	
   public static void main(String[] args) {
	    Scanner in = new Scanner(System.in);
	    ArrayList<String> result = new ArrayList<String>();
	    while(true){
	       int cardNum = Integer.parseInt(in.nextLine());
	       int[] aCard = new int[cardNum];
	       int[] bCard = new int[cardNum];
	    
	       if(cardNum == 0){
	    	   resultToString(result);
	    	   in.close();
	    	   break;
	       }
	    
	       for(int i=0; i<cardNum; i++){
	          String[] pCard = in.nextLine().split(" ");
	          aCard[i] = Integer.parseInt(pCard[0]);
	          bCard[i] = Integer.parseInt(pCard[1]);
	          //System.out.println(aCard[i] +  " " + bCard[i]);
	       }
	       result.add(match(cardNum,aCard,bCard));
	    }
   }
   
   public static String match(int n, int[] a, int[] b){
	   int aScore=0;
	   int bScore=0;
	   
	   for(int i = 0; i < n; i++){
		   if(a[i] > b[i]){
			   aScore = aScore + a[i] + b[i];
		   }else if(a[i] == b[i]){
			   aScore = aScore + a[i];
			   bScore = bScore + b[i];
		   }else{
			   bScore = bScore + a[i] + b[i];
		   }
	   }
	   
	   return aScore + " " + bScore; 
   }
   
   public static void resultToString(ArrayList<String> result){
	   for(int i=0; i<result.size(); i++){
		   System.out.println(result.get(i));
	   }
   }
}

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

import java.io.*;
public class Program0500 {
	public static void main(String[] args){
		int scores[] = new int[2];
		try{
			BufferedReader std = new BufferedReader(new InputStreamReader(System.in));
			int len = Integer.parseInt(std.readLine());
			for(int i=0; i<len; i++){
				String num[] = std.readLine().split(" ");
				if(num[0].compareTo(num[1]) > 0){       scores[0] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
				else if(num[0].compareTo(num[1]) < 0){  scores[1] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
			}
		}catch(IOException | NumberFormatException e){}
		System.out.println(scores[0] + " " + scores[1]);
	}
}

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

import java.io.*;
public class Program0500 {
	public static void main(String[] args){
		int scores[] = new int[2];
		try{
			BufferedReader std = new BufferedReader(new InputStreamReader(System.in));
			int len = Integer.parseInt(std.readLine());
			for(int i=0; i<len; i++){
				String num[] = std.readLine().split(" ");
				if(num[0].compareTo(num[1]) > 0){       scores[0] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
				else if(num[0].compareTo(num[1]) < 0){  scores[1] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
			}
		}
		catch(IOException e){}
		catch(NumberFormatException e){}
		System.out.println(scores[0] + " " + scores[1]);
	}
}

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

import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args){
		ArrayList<Integer[]> resultList = new ArrayList<>();
		try{
			BufferedReader std = new BufferedReader(new InputStreamReader(System.in));
			int len;
			while( (len = Integer.parseInt(std.readLine())) != 0){
				Integer scores[] = {0, 0};
				for(int i=0; i<len; i++){
					String num[] = std.readLine().split(" ");
					if(num[0].compareTo(num[1]) > 0){       scores[0] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
					else if(num[0].compareTo(num[1]) < 0){  scores[1] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
					else{                                   scores[0] += Integer.parseInt(num[0]);  scores[1] += Integer.parseInt(num[1]); }
				}
				resultList.add(scores);
			}
		}
		catch(IOException e){}
		catch(NumberFormatException e){}
		for(Integer result[] : resultList)
			System.out.println(result[0] + " " + result[1]);
	}
}

		}
		catch(IOException e){}
		catch(NumberFormatException e){}
		System.out.println(scores[0] + " " + scores[1]);
	}
}

Compiler output:
Main.java:27: error: class, interface, enum, or record expected
		}
		^
Main.java:31: error: class, interface, enum, or record expected
	}
	^
2 errors
Language: Java

import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args){
		ArrayList<Integer[]> resultList = new ArrayList<Integer[]>();
		try{
			BufferedReader std = new BufferedReader(new InputStreamReader(System.in));
			int len;
			while( (len = Integer.parseInt(std.readLine())) != 0){
				Integer scores[] = {0, 0};
				for(int i=0; i<len; i++){
					String num[] = std.readLine().split(" ");
					if(num[0].compareTo(num[1]) > 0){       scores[0] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
					else if(num[0].compareTo(num[1]) < 0){  scores[1] += Integer.parseInt(num[0]) + Integer.parseInt(num[1]); }
					else{                                   scores[0] += Integer.parseInt(num[0]);  scores[1] += Integer.parseInt(num[1]); }
				}
				resultList.add(scores);
			}
		}
		catch(IOException e){}
		catch(NumberFormatException e){}
		for(Integer result[] : resultList)
			System.out.println(result[0] + " " + result[1]);
	}
}

		}
		catch(IOException e){}
		catch(NumberFormatException e){}
		System.out.println(scores[0] + " " + scores[1]);
	}
}

Compiler output:
Main.java:27: error: class, interface, enum, or record expected
		}
		^
Main.java:31: error: class, interface, enum, or record expected
	}
	^
2 errors
Language: Java

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

public class mountain{

	public static void main(String args[]){
		try{
			while(true){
				// まずカードの枚数を入力
				BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				int cardnum = Integer.parseInt(br.readLine());
				if(cardnum == 0) break; // 0が入力されたら修了
				int scoreA = 0, scoreB = 0;
				for(int i = 0; i < cardnum; i++){
					// スペースで文字を区切る
					String read_str = br.readLine();
					String[] cards_str = read_str.split(" ");
					//System.out.println(cards_str[0]);
					//System.out.println(cards_str[1]);
					int cardA = Integer.parseInt(cards_str[0]);
					int cardB = Integer.parseInt(cards_str[1]);
					if(cardA > cardB){
						scoreA += (cardA + cardB);
					}else if(cardA < cardB){
						scoreB += (cardA + cardB);
					}else{
						scoreA += cardA;
						scoreB += cardB;
					}
				}
				System.out.println(scoreA + " " + scoreB);
			}
		}catch(Exception e){
			System.err.println(e);
		}
	}
}

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

public static void main(String args[]){
		try{
			while(true){
				// まずカードの枚数を入力
				BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				int cardnum = Integer.parseInt(br.readLine());
				if(cardnum == 0) break; // 0が入力されたら修了
				int scoreA = 0, scoreB = 0;
				for(int i = 0; i < cardnum; i++){
					// スペースで文字を区切る
					String read_str = br.readLine();
					String[] cards_str = read_str.split(" ");
					//System.out.println(cards_str[0]);
					//System.out.println(cards_str[1]);
					int cardA = Integer.parseInt(cards_str[0]);
					int cardB = Integer.parseInt(cards_str[1]);
					if(cardA > cardB){
						scoreA += (cardA + cardB);
					}else if(cardA < cardB){
						scoreB += (cardA + cardB);
					}else{
						scoreA += cardA;
						scoreB += cardB;
					}
				}
				System.out.println(scoreA + " " + scoreB);
			}
		}catch(Exception e){
			System.err.println(e);
		}
	}

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.*;

public class Card_Game {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (true) {
			int n = sc.nextInt();
			if (n == 0)
				break;
			int a = 0;
			int b = 0;
			for (int i = 0; i < n; i++) {
				int ta = sc.nextInt();
				int tb = sc.nextInt();
				if (ta > tb)
					a += ta + tb;
				else if (ta < tb)
					b += ta + tb;
				else {
					a += ta;
					b += tb;
				}
			}
			System.out.println(a + " " + b);
		}
		sc.close();
	}
}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
		　　　　int n = sc.nextInt();
		　　　　if(n==0)break;　　
		       int p1 = 0;　
		       int p2 = 0; 
			while(n--!=0){
			        int a = sc.nextInt();
 				int b = sc.nextInt(); 
				if(a>b)p1+=a+b;
				else if(a<b)p2+=a+b;
				else 
					p1+=a;
					p2+=b;
			    }
		   System.out.println(p1 + " " + p2);
		}
	}
}

Compiler output:
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		 ^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		  ^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		   ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		 ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		  ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		   ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		                  ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		                   ^
Main.java:10: error: illegal character: '\u3000'
		       int p1 = 0;?
		                  ^
11 errors
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
		　　　　int n = sc.nextInt();
		　　　　if(n==0)break;　　
		       int p1 = 0;　
		       int p2 = 0; 
			while(n--!=0){
			        int a = sc.nextInt();
 				int b = sc.nextInt(); 
				if(a>b)p1+=a+b;
				else if(a<b)p2+=a+b;
				else {
					p1+=a;
					p2+=b;
				}
			}
		   System.out.println(p1 + " " + p2);
		}
	}
}

Compiler output:
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		 ^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		  ^
Main.java:8: error: illegal character: '\u3000'
		????int n = sc.nextInt();
		   ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		 ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		  ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		   ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		                  ^
Main.java:9: error: illegal character: '\u3000'
		????if(n==0)break;??
		                   ^
Main.java:10: error: illegal character: '\u3000'
		       int p1 = 0;?
		                  ^
11 errors
Language: C

↓カードゲーム
#include <stdio.h>
int main(){
	int a[100]={0},b[100]={0};
	int c=0;
	int A[100]={0},B[100]={0};
	int i,j=0,k=0;
		for(j=0;;j++){
	scanf("%d",&c);
		if(c==0){
			break;
		}
		else{
		k++;
		}
	for(i=0;i<c;i++){
		scanf("%d%d",&a[i],&b[i]);
		if(a[i]>b[i]){
			A[j]=A[j]+a[i]+b[i];
		}
		else if(a[i]<b[i]){
			B[j]=B[j]+a[i]+b[i];
		}
		else{
		A[j]=A[j]+a[i];
		B[j]=B[j]+b[i];
			}
		}
	}
	for(j=0;j<=k-1;j++){
	printf("%d %d\n",A[j],B[j]);
	}
	return 0;
}


Compiler output:
main.c:1:1: error: stray '\342' in program
    1 | <U+2193><U+30AB><U+30FC><U+30C9><U+30B2><U+30FC><U+30E0>
      | ^~~~~~~~
main.c:1:14: error: expected ';' before 'typedef'
    1 | ↓カードゲーム
      |              ^
      |              ;
Language: C

#include <stdio.h>

int main(void)
{
	int a,b,c,n,i,esc=0,f=0;
	w
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d %d",&a,&b);
	if(a>b){
		esc=esc+a+b;
	}
	else if(a==b){
		esc=esc+a;
		f=f+b;
	}
	else{
		f=f+a+b;
	}
	}
	printf("%d\n %d\n",esc,f);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'w'
    6 |         w
      |         ^
main.c:7:15: error: expected declaration specifiers or '...' before string constant
    7 |         scanf("%d",&n);
      |               ^~~~
main.c:7:20: error: expected declaration specifiers or '...' before '&' token
    7 |         scanf("%d",&n);
      |                    ^
Language: C

#include<stdio.h>
int main(void)
{
	int a[10000],b[10000],n,i,c[2];
	for(;;){
		scanf("%d",&n);
		if(n==0)
			break;
		for(i=0;i<n+1;i++){
			scanf("%d%d",&a[i],&b[i]);
			if(a[i]>b[i])
				c[0]=a[i]+b[i];
			else
				c[1]=a[i]+b[i];
		}
		printf("%d %d\n"c[0],c[1]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:33: error: expected ')' before 'c'
   16 |                 printf("%d %d\n"c[0],c[1]);
      |                       ~         ^
      |                                 )
Language: C

#include<stdio.h>
int main()
{
	int a[10000],b[10000],n,i,c[2];
	for(;;){
		scanf("%d",&n);
		if(n==0)
			break;
		for(i=0;i<n+1;i++){
			scanf("%d%d",&a[i],&b[i]);
			if(a[i]>b[i])
				c[0]=a[i]+b[i];
			else
				c[1]=a[i]+b[i];
		}
		printf("%d %d\n"c[0],c[1]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:33: error: expected ')' before 'c'
   16 |                 printf("%d %d\n"c[0],c[1]);
      |                       ~         ^
      |                                 )
Language: C

#include "stdio.h"
#include "stdlib.h"
int main(void){
int i,n;
int suma,sumb;
n=suma=sumb=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==b){
suma+=a;
sumb+=b;
}else if(a>b){
suma+=a+b;
}else{
sumb+=a+b;
}
}
printf("%d %d\n",suma,sumb);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:16: error: 'a' undeclared (first use in this function)
    9 | scanf("%d %d",&a,&b);
      |                ^
main.c:9:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:19: error: 'b' undeclared (first use in this function)
    9 | scanf("%d %d",&a,&b);
      |                   ^
Language: C

#include <stdio.h>

int main(int ac, char** av) {
  int n, score_a = 0, score_b = 0;
  while(true) {
    scanf("%d", &n);
    if(n == 0) return 0;
    int *a = (int*) malloc(sizeof(int) * n);
    int *b = (int*) malloc(sizeof(int) * n);
    int i;
    for(i = 0; i < n; i++) {
      scanf("%d %d", a+i, b+i);
    }
    for(i = 0; i < n; i++) {
      if(a[i] > b[i]) {
        score_a += a[i] + b[i];
      } else if(a[i] < b[i]) {
        score_b += a[i] + b[i];
      } else if(a[i] == b[i]) {
        score_a += a[i];
        score_b += b[i];
      }
    }
    printf("%d %d\n", score_a, score_b);
  }
  free(a);
  free(b);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'true' undeclared (first use in this function)
    5 |   while(true) {
      |         ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
    5 |   while(true) {
      |         ^~~~
main.c:8:21: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    8 |     int *a = (int*) malloc(sizeof(int) * n);
      |                     ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:8:21: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    8 |     int *a = (int*) malloc(sizeof(int) * n);
      |                     ^~~~~~
main.c:8:21: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:26:3: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   26 |   free(a);
      |   ^~~~
main.c:26:3: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:26:3: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
main.c:26:3: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:26:8: error: 'a' undeclared (first use in this function)
   26 |   free(a);
      |        ^
main.c:27:8: error: 'b' undeclared (first use in this function)
   27 |   free(b);
      |        ^
Language: C

#include<stdio.h>
int main(void){
    int loop,a,b,c=0,d=0;
    while(1){
    scanf("%d",&loop);
    if(loop=\0)break;
    for(;loop--;){
        scanf("%d %d",&a,&b);
        if(a!=b){
            if(a>b){
                c+=a+b;
            }else{
                d+=a+b;
            }
        }else{
            c+=a;
            d+=b;
        }
    }
    printf("%d %d\n",c,d);}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: stray '\' in program
    6 |     if(loop=\0)break;
      |             ^
Language: C

#include<stdio.h>
int main (void) {
  int a[10000]={0}, b[10000]={0};
  int c,i=0,asum=0,bsum=0;
  scanf("%d",&c);
  while(1) {
    if(i==c) break;
    scanf("%d%d",&a[i] ,&b[i]);
    if(a[i]>b[i])  asum=asum+a[i]+b[i];
    else if(a[i]<b[i])  bsum=bsum+a[i]+b[i];
    else {
      asum=asum+a[i];
      bsum=bsum+b[i];
    }
    i++;
  }

  printf("%d %d\n",asum ,bsum);
  }
  return 0;
}

Compiler output:
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include <stdio.h>

int main(void){

 int s_num = 1;
 int sum1 = 0;
 int sum2 = 0;

 while(1){
 int i;
 scanf("%d",&s_num);
 if(s_num == 0) break;
 for(i = 0;i < s_num; i++){
  int sam1 = 0;
  int sam2 = 0;

  scanf("%d %d",&sam1,&sam2);
  
  if(sam1 > sam2){
   sum1 += (sam1 + sam2);
  }else if(sam1 < sam 2){
   sum2 += (sam1 +sam2);
  }else{
   sum1 += sam1;
   sum2 += sam2;
  }

  printf("%d %d\n",sam1.sam2);
 

 }

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:19: error: 'sam' undeclared (first use in this function); did you mean 'sam2'?
   21 |   }else if(sam1 < sam 2){
      |                   ^~~
      |                   sam2
main.c:21:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:22: error: expected ')' before numeric constant
   21 |   }else if(sam1 < sam 2){
      |           ~          ^~
      |                      )
main.c:28:24: error: request for member 'sam2' in something not a structure or union
   28 |   printf("%d %d\n",sam1.sam2);
      |                        ^
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int n, a, b, sa = 0, sb = 0;
	int i;
	
	while (1) {
		scanf("%d", &n);
		if (n == 0)
			break;
		for (i = 0; i < n; i++) {
			scanf("%d%d", &a, &b);
			if (a > b)
				sa += a + b;
			else if (b > a)
				sb += a + b;
			else {
				sa += a; sb += b;
			}
		}
		printf("%d %d\n", sa, sb);
	
		return 0;
	}

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

#include <stdio.h>

int main(void) {
	int a,b,i,j,as = 0,bs = 0;
	while(scanf("%d",&j) ; j != 0){
		for(i = 1;i <= j;i++){
			scanf("%d%d", &a, &b);
			if (a > b){
				as = as + a + b;
			}
			else if (a <b){
				bs = bs + a + b;
			}
			else{
				as = as + a;
				bs = bs + b;
			}
		}
		printf("%d %d\n", as ,bs);

	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:29: error: expected ')' before ';' token
    5 |         while(scanf("%d",&j) ; j != 0){
      |              ~              ^~
      |                             )