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

#include<iostream>
#include<algorithm>
int main(){
	int a[10];
	for(int i=0;i<10;i++)cin>>a[i];
	sort(a,a+10);
	for(int i=0;i<3;i++)cout<<a[i]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:30: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         for(int i=0;i<10;i++)cin>>a[i];
      |                              ^~~
      |                              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    6 |         sort(a,a+10);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:7:29: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         for(int i=0;i<3;i++)cout<<a[i]<<endl;
      |                             ^~~~
      |                             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:41: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         for(int i=0;i<3;i++)cout<<a[i]<<endl;
      |                                         ^~~~
      |                                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<stdio.h>
int main(void){
	int i;
	int a[10];
	int x=0, y=0, z=0;
	
	for(i=0;i<10;i++){
		do{
			printf("山の高さ%d(整数)",i+1);
			scanf("%d",&a[i]);
		}while(a[i]<0||10000<a[i])
		
		if(a[i]>x){
			z=y;
			y=x;
			x=a[i];
		}
		else if(a[i]>y){
			z=y;
			y=a[i];
		}
		else if(a[i]>z){
			z=a[i];
		}
	}
	
	printf("%d\n%d\n%d\n",x,y,z);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:43: error: expected ';' before 'if'
   11 |                 }while(a[i]<0||10000<a[i])
      |                                           ^
      |                                           ;
   12 | 
   13 |                 if(a[i]>x){
      |                 ~~
Language: Java


import java.util.Scanner;

public class Main {
	public static void main(String a[]){	
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int s = a+b;
			int c = 0;
			while(s!=0){
				s = s/10;
				c++;
			}
			System.out.println(c);
		}
	}
}


Compiler output:
Main.java:8: error: variable a is already defined in method main(String[])
			int a = scanner.nextInt();
			    ^
1 error
Language: Java

import java.util.Scanner;

public class A {
	public static void main(String a[]){	
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int s = a+b;
			int c = 0;
			while(s!=0){
				s = s/10;
				c++;
			}
			System.out.println(c);
		}
		scanner.close();
	}
}



Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:7: error: variable a is already defined in method main(String[])
			int a = scanner.nextInt();
			    ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String a[]){	
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int s = a+b;
			int c = 0;
			while(s!=0){
				s = s/10;
				c++;
			}
			System.out.println(c);
		}
		scanner.close();
	}
}



Compiler output:
Main.java:7: error: variable a is already defined in method main(String[])
			int a = scanner.nextInt();
			    ^
1 error
Language: Java

import java.util.Scanner;

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


		while(true) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			if(a==0 && b==0) break;
		int sum = a+b;
		int valLen = String.valueOf(sum).length();
		System.out.println(valLen);
		}

	}

}


Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public classMain{
       ^
Main.java:4: 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:19: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        int a = Integer.parseInt(args[0]);
        int b = Integer.parseInt(args[1]);
        int total = a + b;
        int count = 1;
        while (total == 0) {
            int total = total / 10;
            if (total > 0) {
                count++;
            }
        }
        System.out.println(count);
    }
}


Compiler output:
Main.java:8: error: variable total is already defined in method main(String[])
            int total = total / 10;
                ^
1 error
Language: Java

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

public class main {
	public static void main(String[] args) throws NumberFormatException, IOException{
		int firstinput;
		int secondinput;
		int length;
		for(int i=0; i<200; i++){
			Scanner scan = new Scanner(System.in);
			firstinput = scan.nextInt();
			secondinput = scan.nextInt();
			length = String.valueOf((firstinput + secondinput)).length();
			System.out.println(length);
		}
	}
}

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

	import java.io.*; 
public class Digit_Number {
	public static void main(String[] arg)throws IOException{ 
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String[] hairetu = str.split(" ");
		while (hairetu != null){
		int a = Integer.parseInt(hairetu[0]); 
		int b = Integer.parseInt(hairetu[1]); 
		int c = a+b;
		int k = 0;
		while (c>0){
			if (c>0){
				c = (int)(c/10);
				k = k+1;
			}

		}
		System.out.println(k);
		 str = br.readLine();
		 hairetu = str.split(" ");
		}
	}

}

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


import java.util.Scanner;


public class Main1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        for (int i = 0; i < 200; i++) {
            int x1 =input.nextInt();
        int x2 =input.nextInt();
        int x3 = x1+x2;
        String s1 = String.valueOf(x3);
        System.out.println(s1.length());
        }
    }
}

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

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		
		int i = 0;
		int arr = new int[2];
		while( sc.hasNext() ){
			arr = new int[2];
			
    		String line[] = sc.nextLine().split(" ");
			arr[0] = Integer.parseInt(line[0]);
			arr[1] = Integer.parseInt(line[1]);
			
    		System.out.println(String.valueOf(arr[0]+arr[1]).length());
		}
	}
}

Compiler output:
Main.java:15: error: incompatible types: int[] cannot be converted to int
		int arr = new int[2];
		          ^
Main.java:17: error: incompatible types: int[] cannot be converted to int
			arr = new int[2];
			      ^
Main.java:20: error: array required, but int found
			arr[0] = Integer.parseInt(line[0]);
			   ^
Main.java:21: error: array required, but int found
			arr[1] = Integer.parseInt(line[1]);
			   ^
Main.java:23: error: array required, but int found
    		System.out.println(String.valueOf(arr[0]+arr[1]).length());
    		                                     ^
Main.java:23: error: array required, but int found
    		System.out.println(String.valueOf(arr[0]+arr[1]).length());
    		                                            ^
6 errors
Language: Java

class Main{

	public static void main (String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] numbers;
		int a = 0;
		int b = 0;
		int sum = 0;
		int ans = 1;
		
		while ((line = br.readLine()) != null) {
            numbers = line.split(" ");
            a = Integer.parseInt(numbers[0]);
            b = Integer.parseInt(numbers[1]);
            sum = a + b;
            
            while((sum /= 10) > 0){
            	ans++;
            }
            System.out.println(ans);
        }
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main (String[] args) throws IOException{
	                                               ^
  symbol:   class IOException
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java

import java.util.*;

class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b,c;

 a=s.nextInt;
 b=s.nextInt;
 c=a+b;
 c=lnght(c);

 System.out.println(c);
 }
}

 

Compiler output:
Main.java:8: error: cannot find symbol
 a=s.nextInt;
    ^
  symbol:   variable nextInt
  location: variable s of type Scanner
Main.java:9: error: cannot find symbol
 b=s.nextInt;
    ^
  symbol:   variable nextInt
  location: variable s of type Scanner
Main.java:11: error: cannot find symbol
 c=lnght(c);
   ^
  symbol:   method lnght(int)
  location: class Main
3 errors
Language: Java

import java.util.*;

class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b,c;

 a=s.nextInt();
 b=s.nextInt();
 c=a+b;
 c=lnght(c);

 System.out.println(c);
 }
}

 

Compiler output:
Main.java:11: error: cannot find symbol
 c=lnght(c);
   ^
  symbol:   method lnght(int)
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b,c;

 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 c=lnght(a);

 System.out.println(c);
 }
}

 

Compiler output:
Main.java:11: error: cannot find symbol
 c=lnght(a);
   ^
  symbol:   method lnght(int)
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b,c;

 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String a=String.valueOf(intvalue)
 c=string.lnght(a);

 System.out.println(c);
 }
}

 

Compiler output:
Main.java:11: error: ';' expected
 String a=String.valueOf(intvalue)
                                  ^
1 error
Language: Java

import java.util.*;

class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b,c;

 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String a=String.valueOf(intvalue);
 c=string.lnght(a);

 System.out.println(c);
 }
}

 

Compiler output:
Main.java:11: error: variable a is already defined in method main(String[])
 String a=String.valueOf(intvalue);
        ^
Main.java:11: error: cannot find symbol
 String a=String.valueOf(intvalue);
                         ^
  symbol:   variable intvalue
  location: class Main
Main.java:12: error: cannot find symbol
 c=string.lnght(a);
   ^
  symbol:   variable string
  location: class Main
3 errors
Language: Java

import java.util.*;
class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int???a,b;
 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String c = String.valueOf(a);
 System.out.println(c.length());
 }
}

Compiler output:
Main.java:5: error: not a statement
  int???a,b;
  ^
Main.java:5: error: ';' expected
  int???a,b;
     ^
Main.java:5: error: not a statement
  int???a,b;
        ^
Main.java:5: error: ';' expected
  int???a,b;
         ^
Main.java:5: error: not a statement
  int???a,b;
          ^
5 errors
Language: Java

while(sc.hasNext()){
import java.util.*;
class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b;
 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String c = String.valueOf(a);
 System.out.println(c.length());
 }
}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
while(sc.hasNext()){
^
Main.java:14: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.*;
class Main{
 public static void main(String[] args){
 while(sc.hasNext()){
  Scanner s = new Scanner(System.in);
  int a,b;
 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String c = String.valueOf(a);
 System.out.println(c.length());
 }
}
}

Compiler output:
Main.java:4: error: cannot find symbol
 while(sc.hasNext()){
       ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

import java.util.*;
while(sc.hasNext()){
class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
  int a,b;
 a=s.nextInt();
 b=s.nextInt();
 a=a+b;
 String c = String.valueOf(a);
 System.out.println(c.length());
 }
}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
while(sc.hasNext()){
^
Main.java:14: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

class Main {
    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        int digit[] = new int[200];
        
        int i = 0;
        for(; sc.hasNextInt(); i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int sub = a+b;
            digit[i] = String.valueOf(sub).length();
            //System.out.println("digit="+digit[i]);
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(digit[j]);
        }
    }
}

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

import java.io.*;
import java.util.stream.Stream;

class A {

	public static void main(String[] args) throws Exception {
		Stream.of(new BufferedReader(new InputStreamReader(System.in)).lines()).forEach(line -> {
			String[] input = line.split(" ");
			System.out.println(((String) ((int) input[0] + (int) input[1])).length());
		});
	}

}

Compiler output:
Main.java:8: error: cannot find symbol
			String[] input = line.split(" ");
			                     ^
  symbol:   method split(String)
  location: variable line of type Stream<String>
Main.java:9: error: incompatible types: String cannot be converted to int
			System.out.println(((String) ((int) input[0] + (int) input[1])).length());
			                                         ^
Main.java:9: error: incompatible types: String cannot be converted to int
			System.out.println(((String) ((int) input[0] + (int) input[1])).length());
			                                                          ^
3 errors
Language: Java

import java.io.*;
import static java.lang.Integer.parseInt;
import static java.lang.String.valueOf;
import java.util.stream.Stream;

class A {

	public static void main(String[] args) throws Exception {
		Stream.of(new BufferedReader(new InputStreamReader(System.in)).lines()).forEach(line -> {
			String[] input = line.split(" ");
			System.out.println(valueOf(parseInt(input[0]) + parseInt(input[1])).length());
		});
	}

}

Compiler output:
Main.java:10: error: cannot find symbol
			String[] input = line.split(" ");
			                     ^
  symbol:   method split(String)
  location: variable line of type Stream<String>
1 error
Language: Java

import java.io.*;
import static java.lang.Integer.parseInt;
import static java.lang.String.valueOf;
import java.util.stream.Stream;

class Main{

	public static void main(String[] a){
		try {
			Stream.of(new BufferedReader(new InputStreamReader(System.in)).lines()).forEach(line -> {
				String[] input = line.split(" ");
				System.out.println(valueOf(parseInt(input[0]) + parseInt(input[1])).length());
			});
		} catch (Exception ex) {
			ex.printSrackTrace();
		}
	}

}

Compiler output:
Main.java:11: error: cannot find symbol
				String[] input = line.split(" ");
				                     ^
  symbol:   method split(String)
  location: variable line of type Stream<String>
Main.java:15: error: cannot find symbol
			ex.printSrackTrace();
			  ^
  symbol:   method printSrackTrace()
  location: variable ex of type Exception
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
 
class Main {
 
    public static void main(String[] args) throws IOException {
 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {

            String s;
 
            while ((s = br.readLine()) != null && list.size() <= 200) {
 
                String[] num = s.split(" ");
                if (0 <= Integer.parseInt(num[0])
                        && Integer.parseInt(num[1]) <= 1000000) {
                    int sum = Integer.parseInt(num[0])
                            + Integer.parseInt(num[1]);
                
                    System.out.println(Integer.toString(sum).length());
                }else {
                    break;
                }
            }

        } finally {
            br.close();
        }
 
    }
}

Compiler output:
Main.java:16: error: cannot find symbol
            while ((s = br.readLine()) != null && list.size() <= 200) {
                                                  ^
  symbol:   variable list
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
class Main {
 
    public static void main(String[] args) throws IOException {
 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {

            String s;
 
            while ((s = br.readLine()) != null && list.size() <= 200) {
 
                String[] num = s.split(" ");
                if (0 <= Integer.parseInt(num[0])
                        && Integer.parseInt(num[1]) <= 1000000) {
                    int sum = Integer.parseInt(num[0])
                            + Integer.parseInt(num[1]);
                
                    System.out.println(Integer.toString(sum).length());
                }else {
                    break;
                }
            }

        } finally {
            br.close();
        }
 
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
            while ((s = br.readLine()) != null && list.size() <= 200) {
                                                  ^
  symbol:   variable list
  location: class Main
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext())
		{
			long a,b,s,p=0;
			a=sc.nextInt();
			b=sc.nextInt();
			s=a+b;
			while(s>0)
			{
				p++;
				s/=10;
			}
			System.out.println(p);
		}
		

	}

}

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

import java.util.*;

class Main{
public static void main(String[] args){
int a;
int b;
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
a=sc.nextInt();
b=sc.nextInt();
int d=Math.log10(a+b)
System.out.println(d);
}
}

Compiler output:
Main.java:11: error: ';' expected
int d=Math.log10(a+b)
                     ^
Main.java:14: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
int a;
int b;
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
a=sc.nextInt();
b=sc.nextInt();
int d=Math.log10(a+b);
System.out.println(d);
}
}
}

Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from double to int
int d=Math.log10(a+b);
                ^
1 error
Language: Java

import java.util.Scanner;

public class Main {import java.util.Scanner;

public class Main {

	/**
	 * Digit Number
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();

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

	private static int calcNumberDigit(int a, int b) {
		int target = a + b;
		int result = 1;
		int divide = 10;

		while (true) {
			if (target % divide < 0) {
				return result;
			}
			divide += 10;
		}
	}
}


	/**
	 * Digit Number
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();

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

	private static int calcNumberDigit(int a, int b) {
		int target = a + b;
		int result = 1;

		while (true) {
			if (target % 10 < 0) {
				return result;
			}
			result += 10;
		}
	}
}

Compiler output:
Main.java:3: error: illegal start of type
public class Main {import java.util.Scanner;
                   ^
Main.java:3: error: <identifier> expected
public class Main {import java.util.Scanner;
                                           ^
2 errors
Language: Java

import java.util.Scanner;
public class A {

	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a=0,b=0,c,i;
        Scanner sc=new Scanner(System.in);
        for(;;){
        try{
        a=sc.nextInt();
        b=sc.nextInt();
        }
        catch (Exception e) {
            System.exit(0);
        }
             
         
         
        c=a+b;
        for(i=1;;i++){
            int d=c/10;
            if(d==0)break;
            c=d;
                     
        }
        System.out.println(i);
     
 
}
}
}

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

import java.util.Scanner;
public class A {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=0,b=0,c,i;
        Scanner sc=new Scanner(System.in);
        for(;;){
        try{
        a=sc.nextInt();
        b=sc.nextInt();
        }
        catch (Exception e) {
            System.exit(0);
        }
             
         
         
        c=a+b;
        for(i=1;;i++){
            int d=c/10;
            if(d==0)break;
            c=d;
                     
        }
        System.out.println(i);
     
 
}
}
}

Compiler output:
Main.java:2: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:7: error: variable sc is already defined in method main(String[])
        Scanner sc=new Scanner(System.in);
                ^
2 errors
Language: Java

import java.util.Scanner;
public class A {

	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        for(;;){
        try{
        a=sc.nextInt();
        b=sc.nextInt();
        }
        catch (Exception e) {
            System.exit(0);
        }
             
         
         
        c=a+b;
        for(i=1;;i++){
            int d=c/10;
            if(d==0)break;
            c=d;
                     
        }
        System.out.print(i);
     
 
}
}
}

Compiler output:
Main.java:2: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:8: error: cannot find symbol
        a=sc.nextInt();
        ^
  symbol:   variable a
  location: class A
Main.java:9: error: cannot find symbol
        b=sc.nextInt();
        ^
  symbol:   variable b
  location: class A
Main.java:17: error: cannot find symbol
        c=a+b;
        ^
  symbol:   variable c
  location: class A
Main.java:17: error: cannot find symbol
        c=a+b;
          ^
  symbol:   variable a
  location: class A
Main.java:17: error: cannot find symbol
        c=a+b;
            ^
  symbol:   variable b
  location: class A
Main.java:18: error: cannot find symbol
        for(i=1;;i++){
            ^
  symbol:   variable i
  location: class A
Main.java:18: error: cannot find symbol
        for(i=1;;i++){
                 ^
  symbol:   variable i
  location: class A
Main.java:19: error: cannot find symbol
            int d=c/10;
                  ^
  symbol:   variable c
  location: class A
Main.java:21: error: cannot find symbol
            c=d;
            ^
  symbol:   variable c
  location: class A
Main.java:24: error: cannot find symbol
        System.out.print(i);
                         ^
  symbol:   variable i
  location: class A
11 errors
Language: Java

import java.util.Scanner;
public class A {

	public static void main(String[] args) {
        
        int a=0,b=0,c,i;
        Scanner sc=new Scanner(System.in);
        for(;;){
        try{
        a=sc.nextInt();
        b=sc.nextInt();
        }
        catch (Exception e) {
            System.exit(0);
        }
             
         
         
        c=a+b;
        for(i=1;;i++){
            int d=c/10;
            if(d==0)break;
            c=d;
                     
        }
        System.out.print(i);
     
 
}
}
}

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

public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    while((a = sc.nextInt()) != EOF){
/*????????§Input*/
//      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    while((a = sc.nextInt()) != EOF){
                                ^
  symbol:   variable EOF
  location: class Main
1 error
Language: Java


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


public class DigitNumber {
    public static void main (String[] args) throws IOException {
        BufferedReader bufReader = new BufferedReader(new InputStreamReader(System.in));
	String input = bufReader.readLine();
	while( !input.isEmpty() ) {
            String[] divideInput = input.split(" ");
            int a = Integer.parseInt( divideInput[0] ); 
            int b = Integer.parseInt( divideInput[1] );
            System.out.println(a + b);
            input = bufReader.readLine();
	}
    }
}

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

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

public class DigitNumber {
	public static void main(String[] args) throws Exception {
			BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
			StringTokenizer tk = new StringTokenizer(in.readLine());
			String pre;
			while(!(pre = tk.nextToken()).equals("EOF")) {
					int a = Integer.parseInt(pre);
					int b = Integer.parseInt(tk.nextToken());
					System.out.println(((a + b) + "").length());
					tk = new StringTokenizer(in.readLine());
			}
	}
}

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

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

	private static void print()  {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			String str = br.readLine();
			String[] nums = str.split(" ", 0);

			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);

	        System.out.println(a+b);

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

	}

}

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

public class DigitNumber {
    public static void main (String args[]) {
        int inputA = 5;int inputB = 7;
        double i = 1;double by = 10;
        while (i>0) {
            by = Math.pow(by,i);
            if (inputA + inputB - by < 0) {
                System.out.println(i);
                break;
            }
            i++;
        }
    }
}

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

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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = null;
        while*1 != null) {
            String[] s = input.split(" ");
            int a = Integer.valueOf(s[0]);
            int b = Integer.valueOf(s[1]);
            System.out.println(String.valueOf(a+b).length());
        }
    }
}

Compiler output:
Main.java:9: error: '(' expected
        while*1 != null) {
             ^
1 error
Language: Java

package ??´???;
import java.util.Scanner;
public class ??´??? {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		double a,b,c,d;
		d=0;
		while(sc.hasNextInt()){
			a=sc.nextInt();
			b=sc.nextInt();
			c=a+b;
			while(c>=1){
				c=c/10;
				d++;
			}
			System.out.println((int)d);
		}
		sc.close();
	}
}

Compiler output:
Main.java:1: error: <identifier> expected
package ??????;
       ^
Main.java:1: error: illegal character: '\u00b4'
package ??????;
          ^
Main.java:3: error: <identifier> expected
public class ?????? {
            ^
Main.java:3: error: illegal character: '\u00b4'
public class ?????? {
               ^
4 errors
Language: Java

package sample;


public class Main {
     public static void main(String[] args) {
        java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
        {
            try {
                String s =in.readLine();
                StringTokenizer st;
                while(s!=null)
                {
                    st = new StringTokenizer(s);
                    int p =Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) ;
                     
                    System.out.println((int)Math.log10(p)+1);
                    s =in.readLine();
                }
            } catch (Exception ex) {
                System.exit(0);
            }
             
             
        }
     }
}

Compiler output:
Main.java:10: error: cannot find symbol
                StringTokenizer st;
                ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:13: error: cannot find symbol
                    st = new StringTokenizer(s);
                             ^
  symbol:   class StringTokenizer
  location: class Main
2 errors
Language: Java

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

		
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			
			int a = scan.nextInt();
			int b = scan.nextInt();
			
			int c = a + b;
			String d = "" + c;
			
			System.out.println(d.length());
		}

	}
}

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

import java.util.Scanner;
class Main{
    public static void main(String[] a){
		Scanner in = new Scanner(System.in);
		int a, b, sum;
		int digit = 1;
		while(in.hasNextInt()){
			a = in.NextInt();
			if(in.hasNextInt()){
				b = in.NextInt();
			}else{
				break;
			}
			sum = a+b;
			while(sum>=10){
				sum /= 10;
				digit++;
			}
			System.out.println(digit);
			digit = 1;
		}
    }
}

Compiler output:
Main.java:5: error: variable a is already defined in method main(String[])
		int a, b, sum;
		    ^
Main.java:8: error: cannot find symbol
			a = in.NextInt();
			      ^
  symbol:   method NextInt()
  location: variable in of type Scanner
Main.java:10: error: cannot find symbol
				b = in.NextInt();
				      ^
  symbol:   method NextInt()
  location: variable in of type Scanner
3 errors
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a, b, sum;
		int digit = 1;
		while(in.hasNextInt()){
			a = in.NextInt();
			if(in.hasNextInt()){
				b = in.NextInt();
			}else{
				break;
			}
			sum = a+b;
			while(sum>=10){
				sum /= 10;
				digit++;
			}
			System.out.println(digit);
			digit = 1;
		}
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
			a = in.NextInt();
			      ^
  symbol:   method NextInt()
  location: variable in of type Scanner
Main.java:10: error: cannot find symbol
				b = in.NextInt();
				      ^
  symbol:   method NextInt()
  location: variable in of type Scanner
2 errors
Language: Java

class Main{
	public static void main(String[] a){
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		char[] c = input.toCharArray();
			
		int count = 0;
			
		for (int i = 0; i < c.length; i++) {
			int num = Character.getNumericValue(c[i]);
			if (i < c.length && num > 0) {
				count += 1;
			}
		}
		System.out.println(count);
	}
}

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

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

public class question2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scanner = new Scanner(System.in);
		List<String> list = new ArrayList<String>();
		String input;
		try {
			int countInput = 0;
            while (scanner.hasNext()){
            	if (countInput > 200) {break;}
                input = scanner.nextLine();
               
                String[] arr = input.split(" ");
                if (arr.length != 2) {
                	System.out.println("wrong integer");
                	break;
                }
                int num1 = Integer.parseInt(arr[0]);
                int num2 = Integer.parseInt(arr[1]);
                if ( (num1 < 0 || num1 > 100000) || (num2 < 0 || num2 > 100000)) {
                	System.out.println("wrong integer");
                	break;
                }
                list.add(input); 
                countInput++;
            }
		}catch (Exception e) {
        	System.err.println("wrong format");
       
        } finally {
            scanner.close();
        }
		
		char[] c;	
		int count,num;
		for (String inputList : list) {
			c = inputList.toCharArray();
			count = 0;
			for (int i = 0; i < c.length; i++) {
				num = Character.getNumericValue(c[i]);
				if (i < c.length && num > 0) {
					count += 1;
				}
			}
			System.out.println(count);
		}
		
	}

}

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

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

public class question2 {

	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		List<String> list = new ArrayList<String>();
		String input;
		try {
			int countInput = 0;
            while (scanner.hasNext()){
            	if (countInput > 200) {break;}
                input = scanner.nextLine();
               
                String[] arr = input.split(" ");
                if (arr.length != 2) {
                	System.out.println("wrong integer");
                	break;
                }
                int num1 = Integer.parseInt(arr[0]);
                int num2 = Integer.parseInt(arr[1]);
                if ( (num1 < 0 || num1 > 100000) || (num2 < 0 || num2 > 100000)) {
                	System.out.println("wrong integer");
                	break;
                }
                list.add(input); 
                countInput++;
            }
		}catch (Exception e) {
        	System.err.println("wrong format");
       
        } finally {
            scanner.close();
        }
		
		char[] c;	
		int count,num;
		for (String inputList : list) {
			c = inputList.toCharArray();
			count = 0;
			for (int i = 0; i < c.length; i++) {
				num = Character.getNumericValue(c[i]);
				if (i < c.length && num > 0) {
					count += 1;
				}
			}
			System.out.println(count);
		}
		
	}

}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.commons.lang.StringUtils;
class Main{
    public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		String strArray[];
		String str;
		while (StringUtils.isNotEmpty(line)) {
			strArray = line.split(" ");
			str = String.valueOf(Integer.valueOf(strArray[0]) + Integer.valueOf(strArray[1]));
			char[] charArray = str.toCharArray();
			System.out.println(charArray.length);
			line = br.readLine();
		}
    }
}

Compiler output:
Main.java:4: error: package org.apache.commons.lang does not exist
import org.apache.commons.lang.StringUtils;
                              ^
Main.java:11: error: cannot find symbol
		while (StringUtils.isNotEmpty(line)) {
		       ^
  symbol:   variable StringUtils
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt() , b = sc.nextInt() , c = 1;
		int n = a + b;
		while(n >= 10){
			n =n/10;
			c++;
		}
		System.out.println(c);
	}
}

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{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n,m;

	String str;

	List<Integer> list = new LinkedList<Integer>();

	while(scan.hasInt()){
	    n = scan.nextInt();
	    m = scan.nextInt();
	    str = String.valueOf(n+m);
 	    list.add(str.length());
 	}

	for(Iterator<Integer> it = list.iterator(); it.hasNext){
	    System.out.println(it.next());
	}
     }
 }

Compiler output:
Main.java:18: error: ';' expected
	for(Iterator<Integer> it = list.iterator(); it.hasNext){
	                                                      ^
1 error
Language: Java

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n,m;

	String str;

	List<Integer> list = new LinkedList<Integer>();

	while(scan.hasNext()){
	    n = scan.nextInt();
	    m = scan.nextInt();
	    str = String.valueOf(n+m);
 	    list.add(str.length());
 	}

	for(Iterator<Integer> it = list.iterator(); it.hasNext();){
	    System.out.println(it.next());
	}
     }
 }

Compiler output:
Main.java:3: error: cannot find symbol
	Scanner scan = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	Scanner scan = new Scanner(System.in);
	                   ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
	List<Integer> list = new LinkedList<Integer>();
	^
  symbol:   class List
  location: class Main
Main.java:8: error: cannot find symbol
	List<Integer> list = new LinkedList<Integer>();
	                         ^
  symbol:   class LinkedList
  location: class Main
Main.java:17: error: cannot find symbol
	for(Iterator<Integer> it = list.iterator(); it.hasNext();){
	    ^
  symbol:   class Iterator
  location: class Main
5 errors
Language: Java

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

public class Main2 {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

}

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

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

public class Main {
  public static void main(String args[] ) throws IOException {
    /BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
}

Compiler output:
Main.java:7: error: illegal start of expression
    /BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    ^
Main.java:7: error: ';' expected
    /BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                   ^
2 errors
Language: Java

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

public class DigitNumber {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		for (int i = 0; i < 200; i++) {
			String str = scan.next();
			if (str.equals("end"))
				break;
			dataList.add(new int[2]);
			((int[]) dataList.get(i))[0] = Integer.parseInt(str);
			((int[]) dataList.get(i))[1] = Integer.parseInt(scan.next());
			scan.reset();
		}
		scan.close();
		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}

	}

}

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

import java.io.*;

class Main{
	public static void main(String[] a){
		int a,b,sum,digits;
		String str;
		String num[]=new String[2];
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in()));
		while(str=String(in.readLine())!=\0){
			digits=1;
			num=str.split(" ",0);
			a=Integer.parseInt(num[1]);
			b=Integer.parseInt(num[2]);
			sum=a+b;
			while(sum/10!=0){
				digits++;
			}
			System.out.println(digits);
		}
	}

}

Compiler output:
Main.java:9: error: illegal character: '\'
		while(str=String(in.readLine())!=\0){
		                                 ^
1 error
Language: Java

import java.io.*;

class Main{
	public static void main(String[] a){
		int a,b,sum,digits;
		String str;
		String num[]=new String[2];
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in()));
		while(str=String(in.readLine())!=EOF){
			digits=1;
			num=str.split(" ",0);
			a=Integer.parseInt(num[1]);
			b=Integer.parseInt(num[2]);
			sum=a+b;
			while(sum/10!=0){
				digits++;
			}
			System.out.println(digits);
		}
	}

}

Compiler output:
Main.java:5: error: variable a is already defined in method main(String[])
		int a,b,sum,digits;
		    ^
Main.java:8: error: cannot find symbol
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in()));
		                                                                 ^
  symbol:   method in()
  location: class System
Main.java:9: error: cannot find symbol
		while(str=String(in.readLine())!=EOF){
		          ^
  symbol:   method String(String)
  location: class Main
Main.java:9: error: cannot find symbol
		while(str=String(in.readLine())!=EOF){
		                                 ^
  symbol:   variable EOF
  location: class Main
Main.java:9: error: incompatible types: String cannot be converted to boolean
		while(str=String(in.readLine())!=EOF){
		         ^
5 errors
Language: Java

import java.io.*;

class Main{
	public static void main(String[] a){
		int a,b,sum,digits;
		String str;
		String num[]=new String[2];
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in()));
		while(str=in.readLine()!=EOF){
			digits=1;
			num=str.split(" ",0);
			a=Integer.parseInt(num[1]);
			b=Integer.parseInt(num[2]);
			sum=a+b;
			while(sum/10!=0){
				digits++;
			}
			System.out.println(digits);
		}
	}

}

Compiler output:
Main.java:5: error: variable a is already defined in method main(String[])
		int a,b,sum,digits;
		    ^
Main.java:8: error: cannot find symbol
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in()));
		                                                                 ^
  symbol:   method in()
  location: class System
Main.java:9: error: cannot find symbol
		while(str=in.readLine()!=EOF){
		                         ^
  symbol:   variable EOF
  location: class Main
Main.java:9: error: incompatible types: String cannot be converted to boolean
		while(str=in.readLine()!=EOF){
		         ^
4 errors