Language: Java

import java.util.*;
2.import java.lang.*;
3.import java.io.*;
4. 
5.class Main
6.{
7.	public static void main (String[] args) throws java.lang.Exception
8.	{
9.		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
10.		String s = br.readLine();
11.		String[] str = s.split("\\s+");
12.		int[] col = new int[str.length];
13.		for(int i = 0;i < str.length;i++){
14.			col[i] = Integer.parseInt(str[i]);
15.		}
16.		boolean[] penki = new boolean[100];
17.		int cnt = 0;
18.		int sum = 0;
19.		while(cnt < 3){
20.			if(!(penki[col[cnt]])){
21.				penki[col[cnt]] = true;
22.				sum++;
23.			}
24.			cnt++;
25.		}
26.		System.out.print(sum);
27.	}
28.}


Compiler output:
Main.java:2: error: class, interface, enum, or record expected
2.import java.lang.*;
^
Main.java:3: error: class, interface, enum, or record expected
3.import java.io.*;
^
Main.java:4: error: class, interface, enum, or record expected
4. 
^
Main.java:5: error: '{' expected
5.class Main
            ^
Main.java:7: error: illegal start of type
7.	public static void main (String[] args) throws java.lang.Exception
^
Main.java:7: error: ';' expected
7.	public static void main (String[] args) throws java.lang.Exception
  	                                                                  ^
Main.java:9: error: not a statement
9.		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:9: error: ';' expected
9.		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  ^
Main.java:10: error: not a statement
10.		String s = br.readLine();
^
Main.java:10: error: ';' expected
10.		String s = br.readLine();
   ^
Main.java:11: error: not a statement
11.		String[] str = s.split("\\s+");
^
Main.java:11: error: ';' expected
11.		String[] str = s.split("\\s+");
   ^
Main.java:12: error: not a statement
12.		int[] col = new int[str.length];
^
Main.java:12: error: ';' expected
12.		int[] col = new int[str.length];
   ^
Main.java:13: error: not a statement
13.		for(int i = 0;i < str.length;i++){
^
Main.java:13: error: ';' expected
13.		for(int i = 0;i < str.length;i++){
   ^
Main.java:14: error: not a statement
14.			col[i] = Integer.parseInt(str[i]);
^
Main.java:14: error: ';' expected
14.			col[i] = Integer.parseInt(str[i]);
   ^
Main.java:15: error: not a statement
15.		}
^
Main.java:15: error: ';' expected
15.		}
   ^
Main.java:16: error: not a statement
16.		boolean[] penki = new boolean[100];
^
Main.java:16: error: ';' expected
16.		boolean[] penki = new boolean[100];
   ^
Main.java:17: error: not a statement
17.		int cnt = 0;
^
Main.java:17: error: ';' expected
17.		int cnt = 0;
   ^
Main.java:18: error: not a statement
18.		int sum = 0;
^
Main.java:18: error: ';' expected
18.		int sum = 0;
   ^
Main.java:19: error: not a statement
19.		while(cnt < 3){
^
Main.java:19: error: ';' expected
19.		while(cnt < 3){
   ^
Main.java:20: error: not a statement
20.			if(!(penki[col[cnt]])){
^
Main.java:20: error: ';' expected
20.			if(!(penki[col[cnt]])){
   ^
Main.java:21: error: not a statement
21.				penki[col[cnt]] = true;
^
Main.java:21: error: ';' expected
21.				penki[col[cnt]] = true;
   ^
Main.java:22: error: not a statement
22.				sum++;
^
Main.java:22: error: ';' expected
22.				sum++;
   ^
Main.java:23: error: not a statement
23.			}
^
Main.java:23: error: ';' expected
23.			}
   ^
Main.java:24: error: not a statement
24.			cnt++;
^
Main.java:24: error: ';' expected
24.			cnt++;
   ^
Main.java:25: error: not a statement
25.		}
^
Main.java:25: error: ';' expected
25.		}
   ^
Main.java:26: error: not a statement
26.		System.out.print(sum);
^
Main.java:26: error: ';' expected
26.		System.out.print(sum);
   ^
Main.java:27: error: not a statement
27.	}
^
Main.java:27: error: ';' expected
27.	}
   ^
Main.java:28: error: illegal start of type
28.}
^
45 errors