Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.Math;

class Main {
	public static void main(String[] args){
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	}
	
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.IOException;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.lang.Math;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:15: error: expected ':' before 'static'
    8 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:8:33: error: 'String' has not been declared
    8 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:8:42: error: expected ',' or '...' before 'args'
    8 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:28:2: error: expected ';' after class definition
   28 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:12:25: error: 'BufferedReader' was not declared in this scope
   12 |                         BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
      |                         ^~~~~~~~~~~~~~
a.cc:13:25: error: 'String' was not declared in this scope
   13 |                         String str[] = (br.readLine()).split("\\s+");
      |                         ^~~~~~
a.cc:14:33: error: 'Integer' was not declared in this scope
   14 |                         int P = Integer.parseInt(str[0]);
      |                                 ^~~~~~~
a.cc:14:50: error: 'str' was not declared in this scope; did you mean 'std'?
   14 |                         int P = Integer.parseInt(str[0]);
      |                                                  ^~~
      |                                                  std
a.cc:18:25: error: 'PrintWriter' was not declared in this scope
   18 |                         PrintWriter pw = new PrintWriter(System.out);
      |                         ^~~~~~~~~~~
a.cc:21:25: error: 'pw' was not declared in this scope
   21 |                         pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
      |                         ^~
a.cc:21:36: error: 'Math' was not declared in this scope
   21 |                         pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
      |                                    ^~~~
a.cc:25:25: error: 'IOException' does not name a type
   25 |                 } catch(IOException e) { System.out.println("Exception :" + e); }
      |                         ^~~~~~~~~~~
a.cc:25:42: error: 'System' was not declared in this scope
   25 |                 } catch(IOException e) { System.out.println("Exception :" + e); }
      |                                          ^~~~~~
a.cc:25:77: error: 'e' was not declared in this scope
   25 |                 } catch(IOException e) { System.out.println("Exception :" + e); }
      |                                                                             ^