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

import java.io.IOException;
public class Main {
    final private static int inputNumMin =     3;
    final private static int inputNumMax = 10000;

    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int inputInt  = scan.nextInt();
        if(!isFormatNum(inputInt)) {
            throw new IOException();
        }
        call(inputInt);
    }
    private static void call(int inputInt) throws IOException {
        final String space = " ";
        for(int i = inputNumMin; i <= inputInt; i++) {
            if (i % 3 == 0 || i % 10 == 3) {
                System.out.print(space + i);
            }
        }
        System.out.println();
    }
    private static boolean isFormatNum(int inputInt) {
        return (inputNumMin <= inputInt && inputInt <= inputNumMax);
    }
}

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


import java.util.Scanner;

public class MAIN
{

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for (int i = 1; i <= n; i++)
		{
			int x = i;
			if (x % 3 == 0)
			{
				System.out.print(" " + x);
			} else if ((x /= 10) >= 1)
			{
				if (x % 10 == 3)
				{
					System.out.print(" " + x);
				}
			} else
			{

			}
		}

	}

}

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.util.Scanner;

public class MAIN
{

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for (int i = 1; i <= n; i++)
		{
			int x = i;
			if (x % 3 == 0)
			{
				System.out.print(" " + x);
			} else if(x>0)
			{
				
				if (x % 10 == 3)
				{
					System.out.print(" " + x);
					x=x/10;
				}
				
			}
		}

	}

}

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.util.Scanner;

public class AOJ5_4 {


    public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	
    	int end_val = scan.nextInt();//end

		for(int cnt = 1; cnt <= end_val; cnt++){//1~end?????§?????°?????????3???????????°?????¨3????????°?????¢???
			if(cnt % 3 == 0){
				System.out.print(" " + cnt);
			}else if(cnt % 10 == 3){
				System.out.print(" " + cnt);
			}
		}
	    scan.close();
    }
}

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

import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int n;

    Scanner in = new Scanner(System.in);

    n = in.nextInt();

    for(int i=1; i<=n; i++){
        int x = i;
        
        if(x%3 == 0){
            System.out.print(" " + i);
        }else{
            x =/ 10;
            while(x>0){
                if(x%10 == 3){
                    System.out.print(" " + i);
                }
                x =/ 10;
            }
        }
    }
    System.out.println();
  }
}

Compiler output:
Main.java:17: error: illegal start of expression
            x =/ 10;
               ^
Main.java:22: error: illegal start of expression
                x =/ 10;
                   ^
2 errors
Language: Java

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

        int n = scan.nextInt();

        for (int i = 1; i <= n; i++) {
            int x = i;
            if (x % 3 == 0) {
                System.out.print(" " + i);
            } else {
                while (x != 0) {
                    if (x % 10 == 3) {
                        System.out.print(" " + i);
                        break;
                    }
                    x /= 10;
                }
            }
        }
        System.out.println();
    }

}

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
2 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		try (Scanner stdin = new Scanner(System.in)) {
			int n = Integer.parseInt(stdin.next());
			if (n < 3 || n > 10000) {
				throw new RuntimeException("Range:3 to 10000");
			}

			IntStream.rangeClosed(1, n).forEach(i -> {
				if (i % 3 == 0) {
					System.out.print(" " + i);
				} else if (i % 10 == 3) {
					System.out.print(" " + i);
				}
			});
			System.out.println("");

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

Compiler output:
Main.java:3: error: cannot find symbol
		try (Scanner stdin = new Scanner(System.in)) {
		     ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		try (Scanner stdin = new Scanner(System.in)) {
		                         ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
			IntStream.rangeClosed(1, n).forEach(i -> {
			^
  symbol:   variable IntStream
  location: class Main
3 errors
Language: Java

import java.util.Scanner;
public.class.Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:
} while (++i<=n);
System.out.println();
}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
public.class.Main{
      ^
Main.java:2: error: <identifier> expected
public.class.Main{
            ^
Main.java:23: error: illegal start of statement
} while (++i<=n);
^
3 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i=1;
		while(true){
			if(i%3==0){
				System.out.printf(" %d", i);
			}else if(i%10==3){
				System.out.printf(" %d", i);
			}
			if(i==n){
				System.out.println();
				break;
			}
			i++;

		}
	

Compiler output:
Main.java:19: error: reached end of file while parsing
		}
		 ^
1 error
Language: Java

import java.util.Scanner;

public class practice{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
	
        int n = sc.nextInt();
        for (int i = 3; i<=n; i++) {
            if ((i % 3) == 0) {
		System.out.printf(" "+i);
            } else  {
                int x = i;
                while (x != 0) {
                    if ((x % 10) == 3) {
			System.out.printf(" "+i);
                        break;
                    }
                    x /= 10;
                }
            }
        }
        System.out.println();
    }
}

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

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:
} while (++i<=n);
System.out.println();
}
}

Compiler output:
Main.java:23: error: illegal start of statement
} while (++i<=n);
^
1 error
Language: Java

import java.util.Scanner;

public class a10014_PrintaChessboard {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 1; i <= n; i++) {
			if (i % 3 == 0) {
				System.out.printf(" %d", i);
			} else if (i % 10 == 3) {
				System.out.printf(" %d", i);
			}
		}
	}
}

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

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:
} 
while (++i<=n);
System.out.println();
}
}

Compiler output:
Main.java:23: error: illegal start of statement
} 
^
1 error
Language: Java

import java.util.Scanner;

	public class Main {

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

			int n = sc.nextInt();
			int i,n;


			for(i=3;i<=n;i++){
				if(i%3==0){
					System.out.print(i+" ");
				}
			}	
		}
	}

Compiler output:
Main.java:9: error: variable n is already defined in method main(String[])
			int i,n;
			      ^
1 error
Language: Java

import java.util.Scanner;

	public class Main {

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

			int n = sc.nextInt();
			int i;


			for(i=3;i=n;i++){
				if(i%3==0){
					System.out.print(" "+i);
				}
			}	
		}
	}

Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to boolean
			for(i=3;i=n;i++){
			         ^
1 error
Language: Java

import java.util.Scanner;

	public class Main {

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

			int n = sc.nextInt();
			int i,n;


			for(i=3;i<=n;i++){
				if(i%3==0) System.out.print(" "+i);
				if(i%10==3) System.out.print(" "+i);
			}	
			System.out.print("\n");
		}
	}

Compiler output:
Main.java:9: error: variable n is already defined in method main(String[])
			int i,n;
			      ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print("" + i);
				break;
			}
		} while (++i <= n);
		System.out.println();
		while (true) {
			if (x % 10 == 3) {
				System.out.print("" + i);
				break;
			}
			x /= 10;
			if (x != 0)
				continue;
			else
				break;
		}
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
			if (x % 10 == 3) {
			    ^
  symbol:   variable x
  location: class Main
Main.java:21: error: cannot find symbol
			x /= 10;
			^
  symbol:   variable x
  location: class Main
Main.java:22: error: cannot find symbol
			if (x != 0)
			    ^
  symbol:   variable x
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

	public class Main {

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

			int n = sc.nextInt();
			int i,j,k;


			for(i=3;i<=n;i++){
				if(i%3==0) System.out.print(" "+i);
				else {
					for(j=i;j>0;j/=10){
						if(j%10==3){
							System.out.print(" "+i);
							break;
						}

					}
						
			}	
			System.out.print("\n");
		}
	}

Compiler output:
Main.java:26: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:

} 
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:24: error: illegal start of statement
} 
^
1 error
Language: Java

import java.util.Scanner;

	public class Main {

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

			int n = sc.nextInt();
			int i,j,k;


			for(i=3;i<=n;i++){
				if(i%3==0) System.out.print(" "+i);
				else {
					for(j=i;j>0;j/=10){
						if(j%10==3){
							System.out.print(" "+i);
							break;
						}

					}
						
			}
		}

			System.out.print("\n");		
	}
	

Compiler output:
Main.java:27: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:


while (++i<=n);
System.out.println();


}

Compiler output:
Main.java:29: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:

}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:24: error: illegal start of statement
}
^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:


while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:28: error: while expected
}
 ^
Main.java:29: error: illegal start of expression
}
^
Main.java:29: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}
}
END_CHECK_NUM:
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:21: error: while expected
}
 ^
Main.java:22: error: ')' expected
END_CHECK_NUM:
             ^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:22: error: illegal start of statement
END_CHECK_NUM:}
              ^
1 error
Language: Java

import java.util.Scanner;

public class a10014_PrintaChessboard {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		while (true) {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			} else {
				while (true) {
					if (x % 10 == 3) {
						System.out.print(" " + i);
						break;
					}
					x /= 10;
					if (x != 0)
						continue;
					else
						break;
				}
			}
			if (++i <= n)
				continue;
			else
				break;
		}
		System.out.println();
	}
}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if (n >= 3 && n <= 10000) {
			int i = 1;
			int x, a, b, c;
			a = 0;
			b = 13;
			c = 0;
			if (n % 3 == 0) {
				x = n / 3;
			} else {
				n = n - n % 3;
				x = n / 3;
			}
			for (i = 1; i <= x; i++) {
				a = a + 3;
				if (a >= b) {
					System.out.printf(" %d", b);
					c = b;
					b = b + 10;
				}
				if (a != c) {
					System.out.printf(" %d", a);
				}
			}
			System.out.printf("\n");
			sc.close();
		}
	}

Compiler output:
Main.java:34: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;


}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:26: error: while expected
}
 ^
Main.java:27: error: illegal start of expression
}
^
Main.java:27: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

import java.util.Scanner;

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

		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(""+i);
			}else{
				do {
					if (x % 10 != 3) {
						x /= 10;
					} else {
						System.out.print("" + i);
						break;
					}
				} while (x != 0);

			} else {
				System.out.print("" + i);
			}
		} while (++i <= n);
		System.out.println();
	}
}

Compiler output:
Main.java:23: error: 'else' without 'if'
			} else {
			  ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
};

END_CHECK_NUM:

};
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:24: error: illegal start of statement
};
^
Main.java:24: error: while expected
};
 ^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do{
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM;

}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:22: error: not a statement
END_CHECK_NUM;
^
1 error
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do{
  int x=i;

while(true){
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:

}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:24: error: illegal start of statement
}
^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner sc= new Scanner(System.in);
	int n = sc.nextInt();
	int i=1;
	
	while(true){
		int x = i;
		if(x%3==0 || x%10==3 || x/10==3){
			System.out.print(" "+x);
		}
		i++;
		if(i>n){
			break;
		}}	
	S

Compiler output:
Main.java:18: error: not a statement
	S
	^
Main.java:18: error: reached end of file while parsing
	S
	 ^
2 errors
Language: Java


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;

		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			} else {
				do {
					if (x % 10 == 3) {
						System.out.print(" " + i);
					} else {
						x /= 10;
					}
				} while (x != 0);
				break;
			}
		} while (++i <= n);
		System.out.println();
	}

}

Compiler output:
Main.java:2: 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:25: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		int  n=sc.nextInt();
		int i=1;
		do{
		int x=i;
			 if ( x % 3 == 0 ){
    	System.out.print(" "+i);
    	continue;
		}
	while(true){
		if ( x % 10 == 3 ){
			System.out.print(" "+i);
			continue;
		}
		x/=10;
		if(x!=0) continue;
		if(x==0) break;
		}while(++i<=n);
	}
		System.out.println();
	}
}

Compiler output:
Main.java:22: error: while expected
	}
	 ^
Main.java:23: error: ')' expected
		System.out.println();
		                    ^
2 errors
Language: Java


	public static void Main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;

		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			} else {
				do {
					if (x % 10 == 3) {
						System.out.print(" " + i);
					} else {
						x /= 10;
					}
				} while (x != 0);
				break;
			}
		} while (++i <= n);
		System.out.println();
	}

}

Compiler output:
Main.java:2: 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:25: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }

while(true){
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:

}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:24: error: illegal start of statement
}
^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main{
   Scanner sc = newScanner(System.in);
   int n = sc.nextInt();
   int i = 1;
   do{
    int x = i;
 
   while(true){
    if(x%10 == 3){
     System.out.print(" " + i);
     break;
    }
    x/= 10;
   
   if(x != 0)continue;
   else break;
   }
   END_CHECK_NUM:
    }while(++i <= n);
   System.out.println();
  }
}

Compiler output:
Main.java:4: error: '(' expected
  public static void main{
                         ^
Main.java:22: error: illegal start of statement
    }while(++i <= n);
    ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
    // void call(int n){
    //   int i = 1;
    //  CHECK_NUM:
    //   int x = i;
    //   if ( x % 3 == 0 ){
    //     cout << " " << i;
    //     goto END_CHECK_NUM;
    //   }
    //  INCLUDE3:
    //   if ( x % 10 == 3 ){
    //     cout << " " << i;
    //     goto END_CHECK_NUM;
    //   }
    //   x /= 10;
    //   if ( x ) goto INCLUDE3;
    //  END_CHECK_NUM:
    //   if ( ++i <= n ) goto CHECK_NUM;

    //   cout << endl;
    // }
    public static void main(String []args){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int n = 100;
	for(int i = 1;i<n;++i){
	    if(i / 10 == 3){
		System.out.print(" " + i);
		continue;
	    }
	    if(i % 3 == 0){
	    	System.out.print(" " + i);
	    	continue;
	    }
	}

    }
}

Compiler output:
Main.java:27: error: variable n is already defined in method main(String[])
	int n = 100;
	    ^
1 error
Language: Java


import java.util.Scanner;

public class Main{
  public static void main(String[] args){
   Scanner sc = newScanner(System.in);
   int n = sc.nextInt();
   int i = 1;
   do{
    int x = i;
 
    while(true){
    if(x%10 == 3){
     System.out.print(" " + i);
     break;
    }
    x/= 10;
   
   if(x != 0)continue;
   else break;
   }
   END_CHECK_NUM:
    }while(++i <= n);
   System.out.println();
  }
}

Compiler output:
Main.java:23: error: illegal start of statement
    }while(++i <= n);
    ^
1 error
Language: Java


import java.util.Scanner;

public class Main{
  public static void main(String[] args){
   Scanner sc = newScanner(System.in);
   int n = sc.nextInt();
   int i = 1;
   do{
    int x = i;
 
    while(true){
    if(x%10 == 3){
     System.out.print(" " + i);
     break;
    }
    x/= 10;
   
    if(x != 0)continue;
    else break;
    }

   }while(++i <= n);
   System.out.println();
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
   Scanner sc = newScanner(System.in);
                ^
  symbol:   method newScanner(InputStream)
  location: class Main
1 error
Language: Java

void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}

Compiler output:
Main.java:4: error: variable declaration not allowed here
  int x = i;
      ^
Main.java:6: error: not a statement
    cout << " " << i;
                ^
Main.java:7: error: not a statement
    goto END_CHECK_NUM;
         ^
Main.java:11: error: not a statement
    cout << " " << i;
                ^
Main.java:12: error: not a statement
    goto END_CHECK_NUM;
         ^
Main.java:15: error: not a statement
  if ( x ) goto INCLUDE3;
                ^
Main.java:17: error: not a statement
  if ( ++i <= n ) goto CHECK_NUM;
                       ^
Main.java:19: error: not a statement
  cout << endl;
       ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
void call(int n){
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: illegal start of expression
    goto END_CHECK_NUM;
    ^
Main.java:12: error: illegal start of expression
    goto END_CHECK_NUM;
    ^
Main.java:15: error: illegal start of expression
  if ( x ) goto INCLUDE3;
           ^
Main.java:17: error: illegal start of expression
  if ( ++i <= n ) goto CHECK_NUM;
                  ^
13 errors
Language: Java

import java.util.Scanner;

public class pro3_2 {
	public static void main(String[] args) {
		// 標準入力からデータを読み込む準備
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			}else{
				do{
				if (x % 10 == 3) {
					System.out.print(" " + i);
					break;
				}
				x /= 10;
				} while (x != 0);
			}
		} while (++i <= n);
		System.out.println();
	}
}

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

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int n = imput.nextInt();
		int i = 1;
		while(i <= n){
			int x = i;
			if(x%3 == 0){
				System.out.print(" "+i);
				i++;
				continue;
			}else if(x%10 == 3){
				System.out.print(" "+i);
				i++;
				continue;
			}else if(x / 10 != 0){
				if(x%10 == 3){
					System.out.print(" "+i);
					i++;
					continue;
				}
			}
		}
		System.out.println("");
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		int n = imput.nextInt();
		        ^
  symbol:   variable imput
  location: class Main
1 error
Language: Java

import java.util.*;

public class a10015{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		do{
			int x = i;
			if(x%3 == 0){
				System.out.printf(" %d", i);
				continue;
			}
			do{
				if(x%10 == 3){
					System.out.printf(" %d", i);
					break;
				}
				x /= 10;
			}while(x > 0);
		}while(++i <= n);
		System.out.printf("\n");
	}
}

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

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

Scanner sc = newScanner(System.in);
int n = sc.nextInt();
int i= 1;

do {
  int x=i;
  if(x%10 == 3){
    System.out.print(" " + i);
    break;
  }

while(true){
x/=10;
if(x != 0)continue;
else break;
}

END_CHECK_NUM:

}
while (++i<=n);
System.out.println();

}
}

Compiler output:
Main.java:23: error: illegal start of statement
}
^
1 error
Language: Java

import java.util.Scanner;

public class Hello {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int i = 1;
		do {
			int x = 1;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			} else {
				do {
					if (x % 10 == 3) {
						System.out.print(" " + i);
						break;
					}
					x /= 10;
				} while (x != 0);
			}
		} while (++i <= 0);
		System.out.println();
	}
}

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

import java.util.Scanner;

public class Hello {
	public static void main(String[] args) {
		try{Scanner sc = new Scanner(System.in);
			int i = 1;
			do {
				int x = 1;
				if (x % 3 == 0) {
					System.out.print(" " + i);
				} else {
					do {
						if (x % 10 == 3) {
							System.out.print(" " + i);
							break;
						}
						x /= 10;
					} while (x != 0);
				}
			} while (++i <= 0);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:5: error: 'try' without 'catch', 'finally' or resource declarations
		try{Scanner sc = new Scanner(System.in);
		^
1 error
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int n = sc.nextInt();
	int i;
	do{
		int x=i;
		if(x%3==0){
					System.out.print(" "+i);
				}else{
					do{
					if(x%10==3){
						System.out.print(" "+i);
						break;
			}
		x/=10;
		while(x!=0);
	}
	}
	}while(++i <= n);
	System.out.println();
	}
}

Compiler output:
Main.java:21: error: while expected
	}
	 ^
Main.java:22: error: illegal start of expression
	}
	^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int n = sc.nextInt();
	int i;
	do{
		int x=i;
		if(x%3==0){
					System.out.print(" "+i);
				}else{
					do{
					if(x%10==3){
						System.out.print(" "+i);
						break;
			}
		x/=10;
		while(x!=0);
	}

	}while(++i <= n);
		}System.out.println();
	}
}

Compiler output:
Main.java:21: error: while expected
	}
	 ^
Main.java:23: error: illegal start of expression
	}while(++i <= n);
	^
Main.java:24: error: while expected
		}System.out.println();
		 ^
Main.java:24: error: ')' expected
		}System.out.println();
		                     ^
4 errors
Language: Java

import java.util.Scanner;
public class Structured{
	public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int n = sc.nextInt();
	int i=1;
	do{
		int x=i;
		if(x%3==0){
					System.out.print(" "+i);
				}else{
					do{
					if(x%10==3){
						System.out.print(" "+i);
						break;
			}
		x/=10;
		}while(x!=0);
	}

	}while(++i <= n);
		System.out.println();	
}
}

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

import java.util.Scanner;

public class Tei {
	public static void main(String[] args) {
	try (Scanner sc = new Scanner(System.in)){
		final int n = sc.nextInt();
		int i = 1;
		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print (" " + i);
			} else {
				do {
					if (x % 10 == 3) {
						System.out.print(" " + i);
						break;
					}
					x /= 10;
				} while (x != 0);
			}
		} while (++i <= n);
		System.out.println();
	}
}}

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

import java.util.Scanner;

public class StructuredProgram{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		
		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.print(" " + i);
			}else{
				do{
					if (x % 10 == 3) {
						System.out.print(" " + i);
						break;
					}else{
						x /= 10;
					}
				}while(x != 0);
			}
		}while(++i <= n);
		System.out.println();	
	}
}

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

import java.util.Scanner;

public class Main{
  public static void main(string[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int i = 1;
    do{
      int x = 1;
      if(x%3==0){
        System.out.printf("%d",i);
        continue;
      }
      do{
        if(x%3==0){
          System.out.printf("%d",i);
          break;
        }
        x/=10;
      }while(x>0);
    }while(++i<=n);
    System.out.printf("\n");
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
  public static void main(string[] args){
                          ^
  symbol:   class string
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int n;
		Scanner scanner = new Scanner(System.in);
		n = scanner.nextInt();
		
		for(int i = 3; i <= n; i ++){
			String str_i = String.valueOf(i);
			if(i % 3 == 0 || str_i.indexOf("3")){
				System.out.print(" "+i);	
			}
		}
		System.out.println();
    	scanner.close();
    }
}

Compiler output:
Main.java:11: error: bad operand types for binary operator '||'
			if(i % 3 == 0 || str_i.indexOf("3")){
			              ^
  first type:  boolean
  second type: int
1 error
Language: Java

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.print(" "+i)
				}else{
					while(true){
						if(x%10 == 3){
							System.out.print(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.printIn();
		}
	}
}

Compiler output:
Main.java:9: error: ';' expected
					System.out.print(" "+i)
					                       ^
1 error
Language: Java

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.print(" "+i);
				}else{
					while(true){
						if(x%10 == 3){
							System.out.print(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.printIn();
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		try (Scanner sc = newScanner(System.in)){
		     ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		try (Scanner sc = newScanner(System.in)){
		                  ^
  symbol:   method newScanner(InputStream)
  location: class Main
Main.java:21: error: cannot find symbol
			System.out.printIn();
			          ^
  symbol:   method printIn()
  location: variable out of type PrintStream
3 errors
Language: Java

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i)
				}else{
					while(true){
						if(x%10 == 3){
							System.out.println(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:9: error: ';' expected
					System.out.println(" "+i)
					                         ^
1 error
Language: Java

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					while(true){
						if(x%10 == 3){
							System.out.println(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		try (Scanner sc = newScanner(System.in)){
		     ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		try (Scanner sc = newScanner(System.in)){
		                  ^
  symbol:   method newScanner(InputStream)
  location: class Main
2 errors
Language: Java

inport java.util.Scanner

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					while(true){
						if(x%10 == 3){
							System.out.println(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
inport java.util.Scanner
^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		try (Scanner sc = newScanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					while(true){
						if(x%10 == 3){
							System.out.println(" "+i);
							break;
						}x/=10;
						if(x!=0)continue;
						else break;
					}
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		try (Scanner sc = newScanner(System.in)){
		                  ^
  symbol:   method newScanner(InputStream)
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					do{
						if(x%10 == 3){
							System.out.print
							break;
						}
						x /= 10;
					}while(x != 0);
					}
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:15: error: not a statement
							System.out.print
							          ^
Main.java:15: error: ';' expected
							System.out.print
							                ^
Main.java:21: error: while expected
				}
				 ^
Main.java:22: error: illegal start of expression
			}while(++i <= n);
			^
Main.java:26: error: class, interface, enum, or record expected
}
^
5 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					do{
						if(x%10 == 3){
							System.print(" "+i);
							break;
						}
						x /= 10;
					}while(x != 0);
				}
			}while(++i <= n);
			System.out.println();
		}
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
							System.print(" "+i);
							      ^
  symbol:   method print(String)
  location: class System
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		try (Scanner sc = new Scanner(System.in)){
			final int n = sc.nextInt();
			int i = 1;
			do {
				int x = i;
				if(x%3 == 0){
					System.out.println(" "+i);
				}else{
					do{
						if(x%10 == 3){
							System.out.print(" "+i);
							break;
						}
						x /= 10;
					}while(x != 0);
				}
			}while(++i <= n);
			System.out.printIn();
		}
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
			System.out.printIn();
			          ^
  symbol:   method printIn()
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
	        int n = sc.nextInt();
		int i = 1;
			do {f
				int x = i;
				if(x%3 == 0){
					System.out.print(" "+i);
				}else{
					do{
						if(x%10 == 3){
							System.out.print(" "+i);
							break;
						}
						x /= 10;
					}while(x != 0);
				}
			}while(++i <= n);
			System.out.println();
		
	}
}

Compiler output:
Main.java:8: error: not a statement
			do {f
			    ^
Main.java:8: error: ';' expected
			do {f
			     ^
2 errors
Language: Java

mport java.util.Scanner;

public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int i = 1;
                do{
                int x = i;
                        if(x%3==0){
                                System.out.print(" "+ i);
                                continue;
                        }
                        do{
                                if(x%10==3){
                                        System.out.print(" "+ i);
                                        break;
                                }
                                x/=10;
                        }while(x!=0);
                }while(++i<=n);
                System.out.println();
        }
}

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


public class Main {
	public static void main(String[] args) {
		int x;
		Scanner in = new Scanner(System.in);
		x = in.nextInt();
		for (int counter = 3; counter <= x; counter = counter + 3) {
			//3???????§???????
			System.out.print(" " + counter);
		}
	}
}

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

import java.util.Scanner;
public class Main{
 pubic static void main(String[] args){
 Scanner sc = new Scanner(System.in);
 int n=sc.nextInt();
 int i=1;
 do{
  int x=i;
if(x%3==0){
   System.out.print(""+i);
}else{
 do{
if(x%10==3){
   System.out.print(""+i);
   break;
}
x/=10;
}while(x!=0);
}
}while(++i<=n);
 System.out.println();
}
}

Compiler output:
Main.java:3: error: <identifier> expected
 pubic static void main(String[] args){
      ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
 pubic static void main(String[] args){
 Scanner sc = new Scanner(System.in);
 int n=sc.nextInt();
 int i=1;
 do{
  int x=i;
if(x%3==0){
   System.out.print(" "+i);
}else{
 do{
if(x%10==3){
   System.out.print(" "+i);
   break;
}
x/=10;
}while(x!=0);
}
}while(++i<=n);
 System.out.println();
}
}

Compiler output:
Main.java:3: error: <identifier> expected
 pubic static void main(String[] args){
      ^
1 error
Language: Java

import java.io.*;

public class Java {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		int n = Integer.parseInt(br.readLine().toString());
		int i = 1;
		int x;
		
		do {
			x = i;
			
			if (x % 3 == 0) {
				sb.append(" ").append(i);
				if ((i + 1) <= n) continue;
			} else {
				do {
					if (x % 10 == 3) sb.append(" ").append(i);
					if ((i + 1) <= n) break;
					
					x /= 10;
					
					if (x == 0) {
						continue;
					} else {
						break;
					}
				} while (true);
			}
		} while (++i <= n);
		
		System.out.println(sb);
	}
}

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

import java.util.Scanner;


public class Main2 {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n =scan.nextInt();
		for(int i=3;i<=n;i++){
			if(i%3 == 0){
				System.out.print(" "+i);
			}
			int a = i;
			if(a/1000 == 3){
				System.out.print(" "+i);
			}else{
				a =a - a/1000 *1000;
				if(a/100==3){
					System.out.print(" "+i);
				}else{
						a =a - a/100 *100;
						if(a/10==3){
							System.out.print(" "+i);
						}
					}
				}
			}


		System.out.println();
	}
}

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

  26212 KB    23 lines     450 bytes    2016-07-12 11:16 




?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
import java.io.IOException;
import java.util.Scanner;
 
class Main {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
 
        for (int i = 1; i <= n; i++) {
            int x = i;
            if (x % 3 == 0 || x % 10 == 3) {
                System.out.print(" " + i);
            }else if(i >= 30){
                x /= 10;
                if(x % 10 == 3){
                    System.out.print(" " + i);
                }
            }
        }
        System.out.println("");
    }
}
 

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
  26212 KB    23 lines     450 bytes    2016-07-12 11:16 
  ^
Main.java:32: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.stream.IntStream;

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int n = Integer.parseInt(br.readLine());

            IntStream.range(1, n + 1)
                    .filter(i -> i % 3 == 0)
                    .forEach(i -> System.out.println(" " + i));
        }
    }
}

Compiler output:
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
                                                                                ^
1 error
Language: Java

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

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		int taisyoInt = Integer.parseInt(line);

		for (int i = 1; i <= taisyoInt; i++) {
			if ((i % 3 == 0) || (i % 10 == 3)) {
				System.out.print(" " + i);
			}
		}

	}

Compiler output:
Main.java:19: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.*;
import java.lang.Math;
public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
			String line = reader.readLine();
			int n = Integer.parseInt(line);
			for (int i = 1; i <= n; i++) {
				if (i % 3 == 0) {
					System.out.print(" " + i);
				} else {
					int x = i;
					int y = i;
					int b = 0;
					while (x != 0) {
						x = x % 10;
						if (x == 3) {
							b++;
							break;
						}
						y = y / 10;
						x = y;
					}
					if (b > 0) {
						System.out.print(" " + i);
					}
					
				}
			}
			System.out.println();
		} catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
}import java.io.*;
import java.lang.Math;
public class Main {
	public static void main(String[] args){
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try{
			String line = reader.readLine();
			int n = Integer.parseInt(line);
			for (int i = 1; i <= n; i++) {
				if (i % 3 == 0) {
					System.out.print(" " + i);
				} else {
					int x = i;
					int y = i;
					int b = 0;
					while (x != 0) {
						x = x % 10;
						if (x == 3) {
							b++;
							break;
						}
						y = y / 10;
						x = y;
					}
					if (b > 0) {
						System.out.print(" " + i);
					}
					
				}
			}
			System.out.println();
		} catch (IOException e) {
          System.out.println(e);
        } catch (NumberFormatException e) {
          System.out.println("error");
        }
    }
}

Compiler output:
Main.java:38: error: class, interface, enum, or record expected
}import java.io.*;
 ^
Main.java:39: error: class, interface, enum, or record expected
import java.lang.Math;
^
2 errors
Language: Java

import java.util.*;

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

	public static void main(String[] args){
		int n = scan.nextInt();
		for(int i = 1; i <= n; i++){
			String si = String.valueOf(i);
			if(i % 3 == 0){
				System.out.printf(" %s", si);
			} else if(si.containts("3")){
				System.out.printf(" %s", si);
			}
		}
		System.out.printf("\n");
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
			} else if(si.containts("3")){
			            ^
  symbol:   method containts(String)
  location: variable si of type String
1 error