Language: C++


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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner();
		int n = sc.nextInt();
		int k = sc.nextInt();
		String s = sc.next();
		for(int i = 0; i < n; i++) {
			char c = s.charAt(i);
			if(i == k)
				c = Character.toLowerCase(c);
			System.out.print(c);
		}
	}
}

class Scanner {
	private static final int SPACE = (int)' ';
	private static final int LINE_END_0 = 13;
	private static final int LINE_END_1 = 10;
	private static final int BEFORE = -1;
	private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	public String next(){
		StringBuilder sb = new StringBuilder();
		
		int length = BEFORE;
		readLoop: while(true) {
			try {
				int value = br.read();
				switch(value) {
				case LINE_END_1:
					if(length == BEFORE)
						break;
					
					if((int)sb.charAt(length) == LINE_END_0)
						sb.deleteCharAt(length);
				case SPACE:
					break readLoop;
				}
				sb.append((char)value);
				length++;

			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return sb.toString();
	}
	
	public String[] nextArray(int length) {
		String[] array = new String[length];
		for(int i = 0; i < length; i++)
			array[i] = next();
		return array;
	}
	
	public double nextDouble() {
		return Double.parseDouble(next());
	}
	
	public double[] nextDoubleArray(int length) {
		double[] array = new double[length];
		for(int i = 0; i < length; i++)
			array[i] = nextDouble();
		return array;
	}
	
	public int nextInt() {
		return Integer.parseInt(next());
	}
	
	public int[] nextIntArray(int length) {
		int[] array = new int[length];
		for(int i = 0; i < length; i++)
			array[i] = nextInt();
		return array;
	}
	
	public long nextLong() {
		return Long.parseLong(next());
	}
	
	public long[] nextLongArray(int length) {
		long[] array = new long[length];
		for(int i = 0; i < length; i++)
			array[i] = nextLong();
		return array;
	}
	
	public boolean ready() {
		try {
			return br.ready();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}
}


Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.BufferedReader;
      | ^~~~~~
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.InputStreamReader;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
a.cc:22:16: error: expected ':' before 'static'
   22 |         private static final int SPACE = (int)' ';
      |                ^~~~~~~
      |                :
a.cc:22:24: error: 'final' does not name a type
   22 |         private static final int SPACE = (int)' ';
      |                        ^~~~~
a.cc:23:16: error: expected ':' before 'static'
   23 |         private static final int LINE_END_0 = 13;
      |                ^~~~~~~
      |                :
a.cc:23:24: error: 'final' does not name a type
   23 |         private static final int LINE_END_0 = 13;
      |                        ^~~~~
a.cc:24:16: error: expected ':' before 'static'
   24 |         private static final int LINE_END_1 = 10;
      |                ^~~~~~~
      |                :
a.cc:24:24: error: 'final' does not name a type
   24 |         private static final int LINE_END_1 = 10;
      |                        ^~~~~
a.cc:25:16: error: expected ':' before 'static'
   25 |         private static final int BEFORE = -1;
      |                ^~~~~~~
      |                :
a.cc:25:24: error: 'final' does not name a type
   25 |         private static final int BEFORE = -1;
      |                        ^~~~~
a.cc:26:16: error: expected ':' before 'BufferedReader'
   26 |         private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      |                ^~~~~~~~~~~~~~~
      |                :
a.cc:26:17: error: 'BufferedReader' does not name a type
   26 |         private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      |                 ^~~~~~~~~~~~~~
a.cc:28:15: error: expected ':' before 'String'
   28 |         public String next(){
      |               ^~~~~~~
      |               :
a.cc:28:16: error: 'String' does not name a type
   28 |         public String next(){
      |                ^~~~~~
a.cc:56:15: error: expected ':' before 'String'
   56 |         public String[] nextArray(int length) {
      |               ^~~~~~~
      |               :
a.cc:56:16: error: 'String' does not name a type
   56 |         public String[] nextArray(int length) {
      |                ^~~~~~
a.cc:63:15: error: expected ':' before 'double'
   63 |         public double nextDouble() {
      |               ^~~~~~~
      |               :
a.cc:67:15: error: expected ':' before 'double'
   67 |         public double[] nextDoubleArray(int length) {
      |               ^~~~~~~
      |               :
a.cc:67:22: error: expected unqualified-id before '[' token
   67 |         public double[] nextDoubleArray(int length) {
      |                      ^
a.cc:74:15: error: expected ':' before 'int'
   74 |         public int nextInt() {
      |               ^~~~
      |               :
a.cc:78:15: error: expected ':' before 'int'
   78 |         public int[] nextIntArray(int length) {
      |               ^~~~
      |               :
a.cc:78:19: error: expected unqualified-id before '[' token
   78 |         public int[] nextIntArray(int length) {
      |                   ^
a.cc:85:15: error: expected ':' before 'long'
   85 |         public long nextLong() {
      |               ^~~~~
      |               :
a.cc:89:15: error: expected ':' before 'long'
   89 |         public long[] nextLongArray(int length) {
      |               ^~~~~
      |               :
a.cc:89:20: error: expected unqualified-id before '[' token
   89 |         public long[] nextLongArray(int length) {
      |                    ^
a.cc:96:15: error: expected ':' before 'boolean'
   96 |         public boolean ready() {
      |               ^~~~~~~~
      |               :
a.cc:96:16: error: 'boolean' does not name a type; did you mean 'bool'?
   96 |         public boolean ready() {
      |                ^~~~~~~
      |                bool
a.cc:105:2: error: expected ';' after class definition
  105 | }
      |  ^
      |  ;
a.cc: In member function 'double Scanner::nextDouble()':
a.cc:64:24: error: 'Double' was not declared in this scope; did you mean 'double'?
   64 |                 return Double.parseDouble(next());
      |                        ^~~~~~
      |                        double
a.cc:64:43: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   64 |                 return Double.parseDouble(next());
      |                                           ^~~~
      |                                           nextInt
a.cc: In member function 'int Scanner::nextInt()':
a.cc:75:24: error: 'Integer' was not declared in this scope
   75 |                 return Integer.parseInt(next());
      |                        ^~~~~~~
a.cc:75:41: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   75 |                 return Integer.parseInt(next());
      |                                         ^~~~
      |                                         nextInt
a.cc: In member function 'long int Scanner::nextLong()':
a.cc:86:24: error: 'Long' was not declared in this scope; did you mean 'long'?
   86 |                 return Long.parseLong(next());
      |                        ^~~~
      |                        long
a.cc:86:39: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   86 |                 return Long.parseLong(next());
      |                                       ^~~~
      |                                       nextInt