Language: C++

import java.util.Scanner;

class Main{

	public static void main(String[] args) {


		int[][] data = {{1,11},{5,3}};
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int min = Integer.MAX_VALUE;
		int[] cost = new int[6];
		cost[0] =Math.abs(A - B)+Math.abs(C - B); 
		cost[1] =Math.abs(A - C)+Math.abs(C - B);  
		cost[2] =Math.abs(B - A)+Math.abs(A - C);  
		cost[3] =Math.abs(B - C)+Math.abs(C - A);  
		cost[4] =Math.abs(C - A)+Math.abs(A - B);  
		cost[5] =Math.abs(C - B)+Math.abs(B - A);  

		for(int i= 0;i < 6;i++){
			min = Math.min(min, cost[i]);
		}
		System.out.println(min);





		//		String S = scan.next();

		//		int[] data = new int[N];
		//		for(int i= 0; i < N ;i++){
		//			data[i] = scan.nextInt();
		//		}
		//
		//		int[][] mat = new int[N][N];
		//		int[][] xor = new int[N][N];
		//
		//		for(int i = 0;i < N;i++){
		//			mat[i][i] = data[i];
		//			for(int j = i; j < N-1;j++){
		//				mat[i][j+1] = mat[i][j]+ data[j+1];
		//
		//			}	
		//		}
		//		
		//		for(int i =0 ; i<N;i++){
		//			for(int j = 0;j < N;j++){
		//			System.out.print(mat[i][j]);
		//			System.out.print(" ");
		//
		//			}
		//			System.out.println();
		//
		//		}
		//		
		//
		//		for(int i = 0;i < N;i++){
		//			xor[i][i] = data[i];
		//			for(int j = i; j < N-1;j++){
		//				xor[i][j+1] +=xor[i][j] ^ data[j];
		//
		//			}	
		//		}
		//		
		//		for(int i =0 ; i<N;i++){
		//			for(int j = 0;j < N;j++){
		//			System.out.print(mat[i][j]);
		//			System.out.print(" ");
		//
		//			}
		//			System.out.println();
		//
		//		}
		//
		//		int count = 0;
		//		for(int i= 0;i < N;i++){
		//			for(int j = i;j < N;j++){
		//				if(xor[i][j] == mat[i][j]&&mat[i][j] != 0 ){
		//					count++;
		//				}
		//			}
		//		}
		//		System.out.println(count);
		//
		//


	}
}








Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:15: error: expected ':' before 'static'
    5 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:5:33: error: 'String' has not been declared
    5 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:5:42: error: expected ',' or '...' before 'args'
    5 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:92:2: error: expected ';' after class definition
   92 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:20: error: structured binding declaration cannot have type 'int'
    8 |                 int[][] data = {{1,11},{5,3}};
      |                    ^~
a.cc:8:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:20: error: empty structured binding declaration
a.cc:8:22: error: expected initializer before '[' token
    8 |                 int[][] data = {{1,11},{5,3}};
      |                      ^
a.cc:9:17: error: 'Scanner' was not declared in this scope
    9 |                 Scanner scan = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:10:25: error: 'scan' was not declared in this scope
   10 |                 int A = scan.nextInt();
      |                         ^~~~
a.cc:13:27: error: 'Integer' was not declared in this scope
   13 |                 int min = Integer.MAX_VALUE;
      |                           ^~~~~~~
a.cc:14:20: error: structured binding declaration cannot have type 'int'
   14 |                 int[] cost = new int[6];
      |                    ^~
a.cc:14:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:14:20: error: empty structured binding declaration
a.cc:14:23: error: expected initializer before 'cost'
   14 |                 int[] cost = new int[6];
      |                       ^~~~
a.cc:15:17: error: 'cost' was not declared in this scope; did you mean 'const'?
   15 |                 cost[0] =Math.abs(A - B)+Math.abs(C - B);
      |                 ^~~~
      |                 const
a.cc:15:26: error: 'Math' was not declared in this scope
   15 |                 cost[0] =Math.abs(A - B)+Math.abs(C - B);
      |                          ^~~~
a.cc:25:17: error: 'System' was not declared in this scope
   25 |                 System.out.println(min);
      |                 ^~~~~~