Language: Java

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pint = pair<int, int>;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).bigin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }

int main() {
    int n, k;
    cin >> n >> k;
    char s[n];
    cin >> s;
    s[k - 1] += 32;
    cout << s << endl;
    return 0;
}







Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
using ll = long long;
^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: '.class' expected
using ll = long long;
                ^
Main.java:5: error: '.class' expected
using pint = pair<int, int>;
                     ^
Main.java:5: error: <identifier> expected
using pint = pair<int, int>;
                      ^
Main.java:6: error: illegal character: '#'
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
^
Main.java:6: error: class, interface, enum, or record expected
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
        ^
Main.java:6: error: class, interface, enum, or record expected
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
                                 ^
Main.java:6: error: class, interface, enum, or record expected
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
                                               ^
Main.java:7: error: illegal character: '#'
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
^
Main.java:7: error: class, interface, enum, or record expected
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
                                             ^
Main.java:7: error: class, interface, enum, or record expected
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
                                                     ^
Main.java:8: error: illegal character: '#'
#define ALL(x) (x).bigin(), (x).end()
^
Main.java:9: error: illegal character: '#'
#define MOD 1000000007
^
Main.java:10: error: illegal character: '#'
#define IMAX INT_MAX
^
Main.java:11: error: illegal character: '#'
#define IMIN INT_MIN
^
Main.java:12: error: illegal character: '#'
#define LMAX LLONG_MAX
^
Main.java:13: error: illegal character: '#'
#define LMIN LLONG_MIN
^
Main.java:14: error: class, interface, enum, or record expected
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
                                                                    ^
Main.java:15: error: class, interface, enum, or record expected
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
                                                                    ^
Main.java:16: error: class, interface, enum, or record expected
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }
                                                           ^
Main.java:16: error: class, interface, enum, or record expected
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }
                                                                  ^
Main.java:16: error: class, interface, enum, or record expected
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }
                                                                         ^
Main.java:20: error: class, interface, enum, or record expected
    cin >> n >> k;
    ^
Main.java:21: error: class, interface, enum, or record expected
    char s[n];
    ^
Main.java:22: error: class, interface, enum, or record expected
    cin >> s;
    ^
Main.java:23: error: class, interface, enum, or record expected
    s[k - 1] += 32;
    ^
Main.java:24: error: class, interface, enum, or record expected
    cout << s << endl;
    ^
Main.java:25: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:26: error: class, interface, enum, or record expected
}
^
31 errors