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

import java.util.*;
public class main {
		private static Scanner sc;
		public static void main(String[] args){
			sc = new Scanner(System.in);
			List<Integer> list = new ArrayList<Integer>();
			int a;
			int i=0;
			int judge;
			while ((judge=sc.nextInt())>0){
				for (int j=1; j<judge+1; j++){
					list.add(a = sc.nextInt());
					i++;
				}
				Collections.sort(list);
				Collections.reverse(list);
				int sum = 0;
				for (int k=1; k<i-1; k++){
					sum = sum+list.get(k);
				}
				System.out.println((sum/(i-2)));
				i=0;
				list.clear();
			}
			
		}
}

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

import java.util.*;
public class main {
	private static Scanner sc;
	public static void main(String[] args){
		sc = new Scanner(System.in);
		List<Integer> list = new ArrayList<Integer>();
		int a, i=0, judge;
		while ((judge=sc.nextInt())>0){
			for (int j=1; j<judge+1; j++){
				list.add(a = sc.nextInt());
				i++;
			}
			Collections.sort(list);
			Collections.reverse(list);
			int sum = 0;
			for (int k=1; k<i-1; k++){
				sum = sum+list.get(k);
			}
			System.out.println((sum/(i-2)));
			i=0;
			list.clear();
		}
			
	}
	
}

Compiler output:
Main.java:2: 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(String[] args) {
     // ?¨??????\???????????????????????????????????????
     Scanner sc = new Scanner(System.in);
     while (true) {
       int n = sc.nextInt();
       if (n == 0) {
         break;
       }
       int[] scores = new int[n];
       for (int i = 0; i < scores.length; i++) {
         scores[i] = sc.nextInt();
       }
       double average = 0;
       for(int i = 0; i < n; i++){
         average = average + score[i];
       }
       average = average/n;
       // ??? ?????????average??¨????????£variance????¨????????????? ???
       System.out.println(average);
     }
   }
} 

Compiler output:
Main.java:18: error: cannot find symbol
         average = average + score[i];
                             ^
  symbol:   variable score
  location: class Main
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[] scores = new int[n];
       for (int i = 0; i < n; i++) {
         scores[i] = sc.nextInt();
       }
       double average = 0;
       for(int i = 0; i < n; i++){
         average = average + score[i];
       }
       average = average/n;
       System.out.println(average);
     }
   }
} 

Compiler output:
Main.java:18: error: cannot find symbol
         average = average + score[i];
                             ^
  symbol:   variable score
  location: class Main
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[] scores = new int[n];
       for (int i = 0; i < n; i++) {
         scores[i] = sc.nextInt();
       }
       java.util.Arrays.sort(scores);
       double average = 0;
       for(int i = 1; i < n-1; i++){
         average = average + scores[i];
       }
       average = average/n;
       System.out.println("%.0f",average);
     }
   }
} 

Compiler output:
Main.java:22: error: no suitable method found for println(String,double)
       System.out.println("%.0f",average);
                 ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

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

		int sum=0,i,max=0,min=1000,ave;
		while(true){
		int n=sc.nextInt();
		if(n==0){
			break;
		}
		for(i=0;i<n;i++){
			int point=sc.nextInt();
			if(point<min){
				min=point;
			}
			if(point>max){
				max=point;
			}
			sum=sum+point;
		}
		ave=(sum-max-min)/(n-2);
		System.out.println(ave);
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = 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);
     while (true) {
       int n = sc.nextInt();
       if (n == 0) {
         break;
       }
       int[] scores = new int[n];
       for (int i = 0; i < n; i++) {
         scores[i] = sc.nextInt();
       }
       System.Arrays.sort(scores);
       double average = 0;
       for(int i = 1; i < n-1; i++){
         average = average + scores[i];
       }
       average = average/(n-2);
       System.out.println(Math.floor(average));
     }
   }
} 

Compiler output:
Main.java:16: error: cannot find symbol
       System.Arrays.sort(scores);
             ^
  symbol:   variable Arrays
  location: class System
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int max=0;
		int min=1000;
		while(true){
			int n = sc.nextInt();
			if(n==0){break;}
			int[] scores =new int[n];
			int max=0;
			int min=1000;
			for(int i = 0;i<scores.length; i++){
				if(max<scores[i]){
					max=scores[i];
				}
				if(max<scores[i]){
					min=scores[i];
				}
			}
			average=(average-min-max)/(n-2);
		}
		System.out.println(average);
	}
}

Compiler output:
Main.java:12: error: variable max is already defined in method main(String[])
			int max=0;
			    ^
Main.java:13: error: variable min is already defined in method main(String[])
			int min=1000;
			    ^
Main.java:22: error: cannot find symbol
			average=(average-min-max)/(n-2);
			^
  symbol:   variable average
  location: class Main
Main.java:22: error: cannot find symbol
			average=(average-min-max)/(n-2);
			         ^
  symbol:   variable average
  location: class Main
Main.java:24: error: cannot find symbol
		System.out.println(average);
		                   ^
  symbol:   variable average
  location: class Main
5 errors
Language: Java

import java.util.Scanner;
public class score {
	public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	
	int[] score=new int[20];
	int a=0;
	
	while(true){
    int n=sc.nextInt();
    if(n==0) break;
    int[] s=new int[n];
    int sum=0;
    
    for(int i=0;i<n;i++){
    	s[i]=sc.nextInt();
    }
    
    for(int i=0;i<n;i++){
    	for(int j=i+1;j<n;j++){
    	int temp=0;
    		if(s[i]>=s[j]){	//?°??????????
    			temp=s[i];
    			s[i]=s[j];
    			s[j]=temp;
    		}
    	}	
    }
    
    for(int i=1;i<n-1;i++){
    	sum +=s[i];
    }
    int ave=sum/(n-2);
    score[a]=ave;
    a++;
    
	}
	
	for(int i=0;i<a;i++){
	 System.out.printf("%d\n",score[i]);
	}
}
}

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

public class Main {

    public static void main(String[] args){
        Main m = new Main();
        m.run();
    }

    void run(){
        Scanner sc = new Scanner(System.in);

        for(;;){
            int n = sc.nextInt();
            if(n == 0){
                break;
            }

            int[] s = new int[n];
            for(int i =0 ; i < n ; i++){
                s[i] = sc.nextInt();
            }
            System.out.println(solve(s));

        }
    }

    int solve(int[] s){
        int min = s[0];
        int max = s[0];
        long sum = 0L;

        for(int i = 0; i < s.length; i++){
            min = Math.min (min, s[i]);
            max = Math.max(max,s[i]);
            sum += s[i];
        }

        return (int)(sum - min -max )/ (s.length-2);

    }

}

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

import java.util.*;
import java.io.*;
public class Clown{
    public static void main(String[] args)throws IOException{
    InputStreamReader is = new InputStreamReader(System.in);       
    BufferedReader br = new BufferedReader(is);
        Integer sum = 0; //?????°???????´????????????°
        Integer ave = 0; //????????????????´????????????°
        Integer num = 0; //??\?????????????????°????????????????????°
        Integer loop = 0; //????????????????????°????????????????????°
        Integer divide = 0; //?????????????±???????????????????????±????????????°
        Integer Referee = 0; //????????°???????´????????????°
        
        //????????°?????\???
        System.out.println("????????°?????\?????????????????????.");
        String str = br.readLine();
        
        //??\????????????????????°???int???????????????Referee?????£??\
        Referee = Integer.parseInt(str);
        
        //????´???°?????\????????????????????°??§??????
        ArrayList<Integer> element = new ArrayList<Integer>(Referee);
        
            //????????°?????????????????????
            for (int y = 0; y < Referee; y++){
                //?????°?????\???
                System.out.println("?????°?????\?????????????????????.");
                String Points = br.readLine();
            
                //??\?????????????????°???int???????????????num?????£??\
                num = Integer.parseInt(Points);
                //ArrayList?????????
                element.add(num);
            }
            
            //????´????????????????
            Collections.sort(element);
            
            //????´???°??????1???????????§?????§????????????
            loop = element.size() - 1;
            
            //1?????????????????§????°?????????????
            for (int i = 1; i < loop; i++){
                sum += element.get(i);
            }
            
            //????°??????¨?????§??????????????????????????°??????2??????????????°????±???????
            divide = element.size() - 2;
            
            
            ave = sum / divide;
            
        
        System.out.println("????????????"+ave+"??§???");    
        //System.out.println(sum);   
        
        //System.out.println(loop);
        
        
    }
}

Compiler output:
Main.java:15: error: illegal escape character
        System.out.println("??????????????\?????????????????????.");
                                           ^
Main.java:27: error: illegal escape character
                System.out.println("???????????\?????????????????????.");
                                                ^
2 errors
Language: Java

import java.util.*;
import java.io.*;
    public static void main(String[] args)throws IOException{
    InputStreamReader is = new InputStreamReader(System.in);       
    BufferedReader br = new BufferedReader(is);
        Integer sum = 0; //?????°???????´????????????°
        Integer ave = 0; //????????????????´????????????°
        Integer num = 0; //??\?????????????????°????????????????????°
        Integer loop = 0; //????????????????????°????????????????????°
        Integer divide = 0; //?????????????±???????????????????????±????????????°
        Integer Referee = 0; //????????°???????´????????????°
        
        //????????°?????\???
        System.out.println("????????°?????\?????????????????????.");
        String str = br.readLine();
        
        //??\????????????????????°???int???????????????Referee?????£??\
        Referee = Integer.parseInt(str);
        
        //????´???°?????\????????????????????°??§??????
        ArrayList<Integer> element = new ArrayList<Integer>(Referee);
        
            //????????°?????????????????????
            for (int y = 0; y < Referee; y++){
                //?????°?????\???
                System.out.println("?????°?????\?????????????????????.");
                String Points = br.readLine();
            
                //??\?????????????????°???int???????????????num?????£??\
                num = Integer.parseInt(Points);
                //ArrayList?????????
                element.add(num);
            }
            
            //????´????????????????
            Collections.sort(element);
            
            //????´???°??????1???????????§?????§????????????
            loop = element.size() - 1;
            
            //1?????????????????§????°?????????????
            for (int i = 1; i < loop; i++){
                sum += element.get(i);
            }
            
            //????°??????¨?????§??????????????????????????°??????2??????????????°????±???????
            divide = element.size() - 2;
            
            
            ave = sum / divide;
            
        
        System.out.println("????????????"+ave+"??§???");    
        //System.out.println(sum);   
        
        //System.out.println(loop);
        
        
    }

Compiler output:
Main.java:14: error: illegal escape character
        System.out.println("??????????????\?????????????????????.");
                                           ^
Main.java:26: error: illegal escape character
                System.out.println("???????????\?????????????????????.");
                                                ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args)throws IOException{
                  ^
  (use --enable-preview to enable unnamed classes)
Main.java:26: error: illegal start of expression
                System.out.println("???????????\?????????????????????.");
                                   ^
4 errors
Language: Java

import java.util.*;
import java.io.*;
public class Clown{
    public static void main(String[] args)throws IOException{
    InputStreamReader is = new InputStreamReader(System.in);       
    BufferedReader br = new BufferedReader(is);
    
        Integer sum = 0; //?????°???????´????????????°
        Integer ave = 0; //????????????????´????????????°
        Integer num = 0; //??\?????????????????°????????????????????°
        Integer loop = 0; //????????????????????°????????????????????°
        Integer divide = 0; //?????????????±???????????????????????±????????????°
        Integer Referee = 0; //????????°???????´????????????°
        
        //????????°?????\???
        //System.out.println("????????°?????\?????????????????????.");
        
        //??\????????????????????°???int???????????????Referee?????£??\???0??\??????????¶???????
        while((Referee = Integer.parseInt(br.readLine() ) )!= 0){
        
        //????´???°?????\????????????????????°??§??????
        ArrayList<Integer> element = new ArrayList<Integer>(Referee);
        
            //????????°?????????????????????
            for (int y = 0; y < Referee; y++){
                //?????°?????\???
                //System.out.println("?????°?????\?????????????????????.");
                String Points = br.readLine();
            
                //??\?????????????????°???int???????????????num?????£??\
                num = Integer.parseInt(Points);
                //ArrayList?????????
                element.add(num);
            }
            
            //????´????????????????
            Collections.sort(element);
            
            //????´???°??????1???????????§?????§????????????
            loop = element.size() - 1;
            
            //1?????????????????§????°?????????????
            sum = 0;
            for (int i = 1; i < loop; i++){
                sum += element.get(i);
            }
            
            //????°??????¨?????§??????????????????????????°??????2??????????????°????±???????
            divide = element.size() - 2;
            
            
            ave = sum / divide;
            
        
        System.out.println(ave);
        }
        //System.out.println(sum);   
        
        //System.out.println(loop);
        
        
    }
}

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


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

public class Main {
	public static void main(String[] args){
		new ScoreTotalizerSoftware().run();
	}
	public void run() {
		try {
			// ??????????????????????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			while(true){
				int imputNumber = Integer.parseInt(br.readLine());
				if(imputNumber == 0){
					break;
				} else {
					System.out.println(calc(imputNumber));
				}
			}
		} catch (Exception e) {
			e.getStackTrace();
			System.exit(0);
		}
	}
	private static int calc(int inputNumber){
		int count = 0;
		int maxNum = inputNumber !=1 ?(inputNumber%2 == 0 ? inputNumber/2 : inputNumber/2 + 1): 0;
		int nTmp = 0;
		
		for (int presentMaxNum = maxNum; presentMaxNum > 0; presentMaxNum--){
			for (int content = presentMaxNum; content > 0; content--) {
				nTmp = nTmp + content;
				if(nTmp < inputNumber) {
					if(content == 1){
						nTmp = 0;
						break;
					} else {
						continue;
					}
				} else if (nTmp == inputNumber) {
					count++;
					nTmp = 0;
					break;
				} else if (nTmp > inputNumber) {
					nTmp = 0;
					break;
				}
			}
		}
		return count;
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		new ScoreTotalizerSoftware().run();
		    ^
  symbol:   class ScoreTotalizerSoftware
  location: class Main
1 error
Language: Java


import java.util.Arrays;
import java.util.Scanner;
public class AOJ1159 {
	public static void main(String args[]){
		int n=0,sum=0,ave=0;
		int[] s;
		boolean flag=true;
		Scanner scan = new Scanner(System.in);
		while(flag!=false){
			sum=0;
			ave=0;
			n=scan.nextInt();
			if(n==0){
				flag=false;
				break;
			}
			s = new int[n];
			for(int i = 0;i < n;i++){
				s[i]=scan.nextInt();
			}
			Arrays.sort(s);
			for(int i=1;i<n-1;i++){
				sum+=s[i];
			}
			ave=sum/(n-2);
			System.out.println(ave);
		}
	}
}



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

import java.util.Arrays;
import java.util.Scanner;
public class AOJ1159 {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int sum=0;
			int ave=0;
			int n=scan.nextInt();
			if(n==0){
				break;
			}
			int[] s = new int[n];
			for(int i = 0;i < n;i++){
				s[i]=scan.nextInt();
			}
			Arrays.sort(s);
			for(int i=1;i<n-1;i++){
				sum+=s[i];
			}
			ave=sum/(n-2);
			System.out.println(ave);
		}
	}
}



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

import java.util.Arrays;
import java.util.Scanner;
public class main {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		while(true){
			int sum=0;
			int ave=0;
			int n=scan.nextInt();
			if(n==0){
				break;
			}
			int[] s = new int[n];
			for(int i = 0;i < n;i++){
				s[i]=scan.nextInt();
			}
			Arrays.sort(s);
			for(int i=1;i<n-1;i++){
				sum+=s[i];
			}
			ave=sum/(n-2);
			System.out.println(ave);
		}
	}
}



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

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

public class ProblemA {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		// 平均点を代入する配列
		int[] average;
		average = new int[19];

		// 平均点を代入する要素の個数
		int numDataSet = 0;

		// データ読み込みループ
		for (int k = 0; k < 19; k++) {

			// 審判の数読み込み
			String str = br.readLine();
			int numJudges = Integer.parseInt(str);

			// 審判の数が０なら終了
			if (numJudges == 0)
				break;

			// 点数を代入する配列
			int[] score;
			score = new int[numJudges];

			// 点数代入、最大値・最小値は最初の２つに格納
			for (int i = 0; i < numJudges; i++) {
				String str1 = br.readLine();
				int point = Integer.parseInt(str1);
				score[i] = point;

				if (score[0] < score[i]) {
					int temp = score[0];
					score[0] = score[i];
					score[i] = temp;
				}

				if (score[1] > score[i]) {
					int temp = score[1];
					score[1] = score[i];
					score[i] = temp;
				}
			}

			// 最大値と最小値を除いた合計点÷（審判の数ー２）
			int sum = 0;
			for (int i = 2; i < numJudges; i++) {
				sum += score[i];
			}
			int ave = sum / (numJudges - 2);

			// 平均的配列に格納
			average[k] = ave;

			numDataSet++;

		}

		for (int l = 0; l < numDataSet; l++) {
			System.out.println(average[l]);

		}

	}

}



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
3 errors
Language: Java

import java.awt.print.Printable;
import java.util.Arrays;
import java.util.Scanner;
import javax.sound.midi.SysexMessage;
  
public class Main{      
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);

        for(int i=0;i<20;i++){
            int n = sc.nextInt();
            int points[] = new int[n];

            for(int j=0;j<n;j++){
                points[j]=sc.nextInt();
            }
            Arrays.sort(points);
        
            points[0]=0;
            points[n-1]=0;

            double sum=0.0;
            double ave=0.0;
            for(int j=0;j<n;j++){
                sum += points[j]
            }
            ave = sum/(double)(n-2);

            int ave2 = Math.floor(ave);

            System.out.println(ave2);
        
        }
        sc.close();
        
    }   
}


Compiler output:
Main.java:26: error: ';' expected
                sum += points[j]
                                ^
1 error
Language: Java

import java.awt.print.Printable;
import java.util.Arrays;
import java.util.Scanner;
import javax.sound.midi.SysexMessage;
  
public class Main{      
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);

        for(int i=0;i<20;i++){
            int n = sc.nextInt();
            int points[] = new int[n];

            for(int j=0;j<n;j++){
                points[j]=sc.nextInt();
            }
            Arrays.sort(points);
        
            points[0]=0;
            points[n-1]=0;

            double sum=0.0;
            double ave=0.0;
            for(int j=0;j<n;j++){
                sum += points[j];
            }
            ave = sum/(double)(n-2);

            int ave2 = Math.floor(ave);

            System.out.println(ave2);
        
        }
        sc.close();
        
    }   
}


Compiler output:
Main.java:30: error: incompatible types: possible lossy conversion from double to int
            int ave2 = Math.floor(ave);
                                 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] array=new int[20];
        int c=0;
        for(int i=0;;i++){
            int n=sc.nextInt();
            if(n==0){
                break;
            }
            int min=1001;
            int max=-1;
            int cmin=0,cmax=0;
            int S=0;
            for(int j=0;j<=n-1;j++){
                int[] array2=new int[n];
                array2[j]=sc.nextInt();
                if(array2[j]<min){
                    cmin=j;
                }
                if(array2[j]>max){
                    cmax=j;
                }
            }
            for(int j=0;j<=n-1;j++){
                if((j==cmin)||(j==cmax)){
                    continue;
                }else{
                    S+=array2[j];
                }
            }
            array[i]=(int)S/n;
            S=0;
            c++;
        }
        for(int i=0;i<c;i++){
            System.out.println(array[i]);
        }
    }
}


Compiler output:
Main.java:30: error: cannot find symbol
                    S+=array2[j];
                       ^
  symbol:   variable array2
  location: class Main
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[] score = new int[n];
		int max_score = -1, min_score = 1001;
		int sum = 0;

		for (int i = 0; i < n; i++) {
			score[i] = sc.nextInt();
			sum += score[i];
			if(max_score < score[i]){
				max_score = score[i];
			}else if(min_score > score[i]){
				min_score = score[i];
			}
		}
		System.out.printf("\n%d",(sum - max_score - min_score) / (n - 2));
		}

	}
       System.out.println();
}


Compiler output:
Main.java:28: error: <identifier> expected
       System.out.println();
                         ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        try(Scanner sc =new Scanner(System.in));
        while(true){
        int n;
        int max=0,min=1000,sum=0;
        n=sc.nextInt();
        int []a =new int [n];

        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            if(max<a[i]){
                max=a[i];
            }else if(a[i]<min){
                min=a[i];
            }
            sum=sum+a[i];
        }
        sum=sum-max-min;
        int ave =sum/(n-2);

        System.out.println(ave);


    }
}
}


Compiler output:
Main.java:4: error: '{' expected
        try(Scanner sc =new Scanner(System.in));
                                               ^
Main.java:28: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

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[] s = new int[n];
			for (int i = 0; i < n; i++) {
				s[i] = sc.nextInt();
			}

			Arrays.sort(s);

			int sum = 0;
			for (int i = 1; i < n - 1; i++) {
				sum += s[i];
			}

			int avg = sum / (n - 2);

			System.out.println(avg);

		}

		sc.close();

	}

}


Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:20: error: cannot find symbol
			Arrays.sort(s);
			^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: Java

import java.util.*;

  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n,max=0,min=1000,seiseki=0;

while(null == (n = scan.next())){//scan.next()が実行できるまでやる
	int s[] = int[n];
	
	for (int i = 0;i == n;i++){
		s[i] = scan.next();
		sum = sum + s[i];

		if(max<s[i]){
			max = s[i];
		}

		if(min>s[i]){
			min = s[i];
		}
	}
	int seiseki = sum - (max + min) / (n - 2);
	System.out.println(seiseki);
}

Compiler output:
Main.java:8: error: not a statement
	int s[] = int[n];
	              ^
Main.java:3: 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)
Main.java:8: error: ';' expected
	int s[] = int[n];
	               ^
Main.java:24: error: reached end of file while parsing
}
 ^
4 errors
Language: Java

import java.util.*;

  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int n,max=0,min=1000,seiseki=0;

while(n = scan.next() == null){
	int s[] = int[n];
	
	for (int i = 0;i == n;i++){
		s[i] = scan.next();
		sum = sum + s[i];

		if(max<s[i]){
			max = s[i];
		}

		if(min>s[i]){
			min = s[i];
		}
	}
	int seiseki = sum - (max + min) / (n - 2);
	System.out.println(seiseki);
}
}

Compiler output:
Main.java:8: error: not a statement
	int s[] = int[n];
	              ^
Main.java:3: 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)
Main.java:8: error: ';' expected
	int s[] = int[n];
	               ^
3 errors
Language: Java


import java.util.Arrays;
import java.util.Scanner;

public class AOJ1147 {

	static int a[];
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i,n,sum,ans;
		
		while(true){
			sum=0;
			n=sc.nextInt();
			if(n==0) break;
			a=new int[n];
			for(i=0;i<n;i++){
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			for(i=1;i<n-1;i++){
				sum+=a[i];
			}
			ans=sum/(n-2);
			System.out.println(ans);
		}

	}

}

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

public class Main {
	public static void main(String[] args){
		Scanner sin = new Scanner(System.in);
		while (true) {
			int judgeCount = sin.nextInt();
			if (judgeCount == 0) break;
			int[] points = new int[judgeCount];
			int point = 0;
			for (int i = 0; i < judgeCount; i++) {
				point += points[i]  = sin.nextInt();
			}
			System.out.println(Math.round((point - max(points) - min(points))/(judgeCount-2)));
		}
	}
	
	private static int max(int[] datas){
		int result = datas[0];
		for (int i : datas) {
			result = Math.max(result, i);
		}
		return result;
	}
	
	private static int min(int[] datas){
		int result = datas[0];
		for (int i : datas) {
			result = Math.min(result, i);
		}
		return result;
	}
	
	
}

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

import java.util.*;
 
public class testcode {
public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt(),max=0,min=1000,seiseki=0,sum = 0;
 
do{
    int s[] = new int [n];
     
    for (int i = 0;i == n;i++){
        s[i] = scan.nextInt();
        sum = sum + s[i];
 
        if(max<s[i]){
            max = s[i];
        }
 
        if(min>s[i]){
            min = s[i];
        }
    }
    seiseki = sum - (max + min) / (n - 2);
    System.out.println(seiseki);
    n = scan.nextInt();
} while(n == 0);
}
}

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

import java.util.ArrayList;
import java.util.Scanner;
import org.eclipse.xtext.xbase.lib.InputOutput;

@SuppressWarnings("all")
public class Main {
  public static void main(final String[] args) {
    Scanner _scanner = new Scanner(System.in);
    Scanner sc = _scanner;
    boolean _solveQ = ICPCScoreTotalizerSoftware.solveQ(sc);
    boolean _while = _solveQ;
    while (_while) {
      boolean _solveQ_1 = ICPCScoreTotalizerSoftware.solveQ(sc);
      _while = _solveQ_1;
    }
  }
  
  public static boolean solveQ(final Scanner sc) {
    int n = sc.nextInt();
    boolean _equals = (n == 0);
    if (_equals) {
      return false;
    }
    ArrayList<Integer> _arrayList = new ArrayList<Integer>();
    ArrayList<Integer> list = _arrayList;
    int i = 0;
    boolean _lessThan = (i < n);
    boolean _while = _lessThan;
    while (_while) {
      {
        int _nextInt = sc.nextInt();
        list.add(Integer.valueOf(_nextInt));
        int _plus = (i + 1);
        i = _plus;
      }
      boolean _lessThan_1 = (i < n);
      _while = _lessThan_1;
    }
    i = 0;
    Integer max = list.get(0);
    Integer min = list.get(0);
    int sum = 0;
    boolean _lessThan_1 = (i < n);
    boolean _while_1 = _lessThan_1;
    while (_while_1) {
      {
        Integer _get = list.get(i);
        int _plus = (sum + (_get).intValue());
        sum = _plus;
        Integer _get_1 = list.get(i);
        int _max = Math.max((max).intValue(), (_get_1).intValue());
        max = Integer.valueOf(_max);
        Integer _get_2 = list.get(i);
        int _min = Math.min((min).intValue(), (_get_2).intValue());
        min = Integer.valueOf(_min);
        int _plus_1 = (i + 1);
        i = _plus_1;
      }
      boolean _lessThan_2 = (i < n);
      _while_1 = _lessThan_2;
    }
    int _minus = (sum - (max).intValue());
    int _minus_1 = (_minus - (min).intValue());
    sum = _minus_1;
    int _minus_2 = (i - 2);
    n = _minus_2;
    int ave = (sum / n);
    InputOutput.<Integer>println(Integer.valueOf(ave));
    return true;
  }
}

Compiler output:
Main.java:3: error: package org.eclipse.xtext.xbase.lib does not exist
import org.eclipse.xtext.xbase.lib.InputOutput;
                                  ^
Main.java:10: error: cannot find symbol
    boolean _solveQ = ICPCScoreTotalizerSoftware.solveQ(sc);
                      ^
  symbol:   variable ICPCScoreTotalizerSoftware
  location: class Main
Main.java:13: error: cannot find symbol
      boolean _solveQ_1 = ICPCScoreTotalizerSoftware.solveQ(sc);
                          ^
  symbol:   variable ICPCScoreTotalizerSoftware
  location: class Main
Main.java:68: error: cannot find symbol
    InputOutput.<Integer>println(Integer.valueOf(ave));
    ^
  symbol:   variable InputOutput
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

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

		Scanner s = new Scanner(System.in);

		while (true) {
			int n = s.nextInt();

			if (n == 0)
				break;

			int[] a = new int[n];
			int max = 0;
			int min = 0;
			int sum = 0;
			int ave = 0;

			for (int t = 0; t < n; t++) {
				a[t] = s.nextInt();
			}

			max = a[0];
			min = a[0];

			for (int i = 0; i < n; i++) {
				if (max <= a[i])
					max = a[i];

				if (min >= a[i])
					min = a[i];

				sum += a[i];
			}

			sum = sum - max - min;
			ave = sum / (n - 2);

			System.out.println(ave);
		}
	}
}

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

import java.utill.*;

public class Main(){
	Scanner sc;
	static void solve(){
		sc=new Scanner(System.in);
		while(sc.hasNext()){
			int score[]=new int[sc.nextInt()];
			float sum=0;

			for(int i=0; i<score.length; i++)
				score[i]=sc.nextInt();
			for(int i=1; i<score.length-1; i++)
				sum+=score[i];
			sum/=score.length-2;
			System.out.println((int)sum);
		}
		sc.close;
	}
}

Compiler output:
Main.java:3: error: '{' expected
public class Main(){
                 ^
Main.java:18: error: not a statement
		sc.close;
		  ^
2 errors
Language: Java

import java.utill.*;

public class Main(){
	Scanner sc;
	static void solve(){
		sc=new Scanner(System.in);
		while(sc.hasNext()){
			int score[]=new int[sc.nextInt()];
			float sum=0;

			for(int i=0; i<score.length; i++)
				score[i]=sc.nextInt();
			for(int i=1; i<score.length-1; i++)
				sum+=score[i];
			sum/=score.length-2;
			System.out.println((int)sum);
		}
		sc.close();
	}
}

Compiler output:
Main.java:3: error: '{' expected
public class Main(){
                 ^
1 error
Language: Java

/**
 * Created by Reopard on 2014/05/06.
 */
public class Main {
    public static void main(String ars[]){
        int n, tmp, ave;
        String line;
        int score[] = new int[100];
        Scanner sc = new Scanner(System.in);

        while(true){
            ave = 0;
            n = sc.nextInt();
            if(n == 0) break;
            for(int i = 0; i < n; i++) score[i] = sc.nextInt();
            for(int i = 0; i < n; i++) {
                for (int j = n-1; j > i; j--) {
                    if (score[j] < score[j-1]) {
                        tmp = score[j-1];
                        score[j-1] = score[j];
                        score[j] = tmp;
                    }
                }
            }
            for(int i = 1; i < n-1; i++) ave += score[i];
            ave /= n-2;
            System.out.println(ave);
        }


    }
}

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

import java.util.Scanner;

/**
 * Created by Reopard on 2014/05/06.
 */
public class ScoreTotalizer {
    public static void main(String ars[]){
        int n, tmp, ave;
        String line;
        int score[] = new int[100];
        Scanner sc = new Scanner(System.in);

        while(true){
            ave = 0;
            n = sc.nextInt();
            if(n == 0) break;
            for(int i = 0; i < n; i++) score[i] = sc.nextInt();
            for(int i = 0; i < n; i++) {
                for (int j = n-1; j > i; j--) {
                    if (score[j] < score[j-1]) {
                        tmp = score[j-1];
                        score[j-1] = score[j];
                        score[j] = tmp;
                    }
                }
            }
            for(int i = 1; i < n-1; i++) ave += score[i];
            ave /= n-2;
            System.out.println(ave);
        }


    }
}

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

mport java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		for(;;){
			int max = 0;
			int min = 1000;
			int answer = 0;
			int n = sc.nextInt();
			if(n == 0){
				break;
			}
			int [] array = new int[n];
			for(int i = 0; i < n; i++){
				array[i] = sc.nextInt();
			}
			for(int i = 0; i < n; i++){
				if(array[i] >= max){
					max = array[i];
				}
			}
			for(int i = 0; i < n; i++){
				if(array[i] <= min){
					min = array[i];
				}
			}
			for(int i = 0; i < n; i++){
				if(min == array[i]){
					array[i] = 0;
					break;
				}
			}
			for(int i = 0; i < n; i++){
				if(max == array[i]){
					array[i] = 0;
					break;
				}
			}
			for(int i = 0; i < n; i++){
				answer += array[i];
			}
			answer = answer / (n - 2);
			System.out.println(answer);
		}
	}

}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

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

public class ICPC_score{
    public static void main(String[] args){
        int n = 1;

        Scanner scan = new Scanner(System.in);
        n = scan.nextInt();

        while(n !=0){
            ArrayList<Integer> score = new ArrayList<Integer>();
            int max = 0, min = 1000, total = 0;
            for(int i = 0; i < n; i++ ){
                score.add(scan.nextInt());
            }

            for(int i = 0;i < n ;i++){
                int a = score.get(i);
                max = Math.max(a, max);
                min = Math.min(a, min);
                total += a;
            }

            int ave = (total - (max + min)) / (n -2);

            System.out.println(ave);
            n = scan.nextInt();
        }
        scan.close();
    }
}

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

#include <stdio.h>

int main(void)
{
  int n; // # of judges; 3 <= n && n <= 100
  int input, score, max_score, min_score;
  int i;
  
  while (1) {
    scanf("%d", &n);
    if (n == 0) break;

    // scanf the first value for temporaly max(min) value
    scanf("%d", &input);
    max_score = input;
    min_score = input;
    score = 0;
    
    for (i=0; i<n-1; i++) {
      scanf("%d", &input);
      if (input > max_score) {
	score += max_score;
	max_score = input;
      } else if (input < min_score) {
	score += min_score;
	min_score = input;
      } else {
	score += input;
      }
    }
    
    printf("%d\n", score / (n-2);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:33: error: expected ')' before ';' token
   32 |     printf("%d\n", score / (n-2);
      |           ~                     ^
      |                                 )
main.c:32:34: error: expected ';' before '}' token
   32 |     printf("%d\n", score / (n-2);
      |                                  ^
      |                                  ;
   33 |   }
      |   ~
Language: C

#include<stdio.h>

int main(){
  int n,a[n],sum,min,max;
  double ave;
  for(i=0,i<21,i++){
    scanf("%d",&n);
    if(n==0)
      break;
    elif{
      sum = 0;
      min = 1000;
      max = 0;
      for(i=0;i<n;i++){
        scanf("%d",&f[i]);
        sum += f[i];
      }
      for(i=0;i<n;i++){
        if(min>a[i])min=a[i];
        if(max<a[i])max=a[i];
      }
      ave = (sum - min -max)/(n-2);
      printf("%d",ave);
    }
  }
  return o;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i=0,i<21,i++){
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:19: error: expected ';' before ')' token
    6 |   for(i=0,i<21,i++){
      |                   ^
      |                   ;
main.c:6:19: error: expected expression before ')' token
main.c:10:5: error: 'elif' undeclared (first use in this function)
   10 |     elif{
      |     ^~~~
main.c:10:9: error: expected ';' before '{' token
   10 |     elif{
      |         ^
      |         ;
main.c:26:10: error: 'o' undeclared (first use in this function)
   26 |   return o;
      |          ^
Language: C

#include <stdio.h>

int main() {
    int max, min ,n, s[128], i;
    int x;
    
    do {
        scanf("%d", &n);
        if(!n)
            break;
        
        max = 0;
        min = 1000;
        temp = 0;
        
        for(i = 0; i < n; i++) {
            scanf("%d", &s[i]);
            if(s[i] > max)
                max = s[i];
            if(min > s[i])
                min = s[i];
            
            x += s[i];
        }
        
        printf("%d\n", (x - max - min) / (n - 2));
    } while(1);
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: 'temp' undeclared (first use in this function)
   14 |         temp = 0;
      |         ^~~~
main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include <stdio.h>

int main(){
    int i,a[i],n,l=0,s=1000,t;
    double x;
    do{
        
    scanf("%d",&n);
        if (n==0) break;
        for (i=0;i<n;i++) {
            scanf("%d",&a[i]);
            if (l<a[i]) {l=a[i];}
            if (s>a[i]) {s=a[i];}
        
       
    
        for (i=0,t=0;i<n;i++) {
            t=t+a[i];
        }
        t=t-l-s;
        x=t/(n-2);
        printf("%d",(int)x);
    
       
        
    }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:5: error: expected 'while' before 'return'
   29 |     return 0;
      |     ^~~~~~
Language: C


#include <stdio.h>

int main(){
    int i,a[i],n,l=0,s=1000,t;
    double x;
    do{
        
    scanf("%d",&n);
        if (n==0) break;
        for (i=0;i<n;i++) {
            scanf("%d",&a[i]);
            if (l<a[i]) {l=a[i];}
            if (s>a[i]) {s=a[i];}
        
       
    
        for (i=0,t=0;i<n;i++) {
            t=t+a[i];
        }
        t=t-l-s;
        x=t/(n-2);
        printf("%d",(int)x);
    
       
        }while(1)
    
    return 0;
}

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

#include <stdio.h>

int main(){
    int i,j,n[i],s[i],t,a,b,r[i];
    
    i=0;
    while (1) {
        scanf("%d",&n[i]);
        if (n[i]==0) break;
        t=0;
        a=0;
        b=1000;
        for (j=0;j<n[i];j++) {
            scanf("%d",&s[j]);
            t+=s[j];
            if (a<s[j]) {a=s[j];}
            if (b>s[j]) {b=s[j];}
        }
        r[i]=t-a-b;
        
    }
    for (j=0;j<i;j++) {
        printf("%d\n",(r[i]/(n-2)));
    }
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:23:28: error: invalid operands to binary / (have 'int' and 'int *')
   23 |         printf("%d\n",(r[i]/(n-2)));
      |                        ~~~~^~~~~~
      |                         |     |
      |                         int   int *
Language: C

int num, score[20], n, i, max, min, sum, ave;
while(1){
	scanf("%d",num);
		if(num==0) break;
for( i=0 ; i<num ; i++ ){
	scanf("%d",&score[i]);
}
max = min = score[0];
    for(i=1;i<num;i++){
      if(max < score[i])
    max = score[i];
      if(min > score[i])
    min = score[i];
}
sum=0;
for( i=0 ; i<num ; i++){
sum+=score[i];
}
sum = sum - max - min;
ave = sum / (n-2);
printf("%d\n",ave);
}
return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before 'while'
    2 | while(1){
      | ^~~~~
main.c:23:1: error: expected identifier or '(' before 'return'
   23 | return 0;
      | ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
	int n;
	int s[100];
	int i;
	int min,max,sum;


	while(true){
		scanf("%d",&n);
		if(n==0){
			break;
		}

						
		i=0;
		while(i<n){
			scanf("%d",&s[i]);
			i++;
		}

		min=s[0];
		max=s[0];
		sum=0;
		i=0;

		while(i<n){
			if(min>s[i]){
				min=s[i];
			}

			if(max<s[i]){
				max=s[i];
			}
			i++;
		}
		
		i=0;
		while(i<n){
			sum=sum+s[i];
			i++;
		}

		printf("%d\n",(sum-min-max)/(n-2));
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: 'true' undeclared (first use in this function)
    9 |         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 | int main(void){
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
    9 |         while(true){
      |               ^~~~