criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*

public class Main {
	public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    sc.nextLine();
    String s = sc.next();
    String result = s.toLowerCase(k-1, k);
    System.out.println(result);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: Java

import java.util.*

public class Main {
	public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();
    String result = s.toLowerCase(k-1, k);
    System.out.println(result);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class A1 {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int n = std.nextInt();
        int k = std.nextInt();
        String s = std.next();
        StringBuilder sb = new StringBuilder();
        Map<Character, Character> mapping = new HashMap<>();
        mapping.put('A', 'a');
        mapping.put('B', 'b');
        mapping.put('C', 'c');

        for (int i = 0; i < n; i++) {
            Character c = s.charAt(i);
            if (i == k - 1) {
                sb.append(mapping.get(c));
            } else {
                sb.append(c);
            }
        }

        System.out.println(sb.toString());
    }
}


Compiler output:
Main.java:5: error: class A1 is public, should be declared in a file named A1.java
public class A1 {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
unsigned int uint;
using namespace std;
int main()
{
	int n,k;
	string s;
	cin >> n >> k;
	cin >> s;
	for(int i =0; i< s.size(); ++i)
	{
		if(k-1 == i)
		putchar(tolower(s[i]));
		else cout << s[i];	
	}
	

	
	
	return 0;
}

Compiler output:
a.cc:2:14: error: 'unsigned int uint' redeclared as different kind of entity
    2 | unsigned int uint;
      |              ^~~~
In file included from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/sys/types.h:150:22: note: previous declaration 'typedef unsigned int uint'
  150 | typedef unsigned int uint;
      |                      ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

int main(){
  int n, k;
  std::string s;
  std::cin >> n >> k >> s;
  std::transform(s.cbegin()+k-1, s.cbegin()+k, s.cbegin()+k-1, toupper);
  std::cout << s << std::endl;
  return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<const char*, __cxx11::basic_string<char> >; _OIter = __gnu_cxx::__normal_iterator<const char*, __cxx11::basic_string<char> >; _UnaryOperation = int (*)(int) noexcept]':
a.cc:9:17:   required from here
    9 |   std::transform(s.cbegin()+k-1, s.cbegin()+k, s.cbegin()+k-1, toupper);
      |   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4220:19: error: assignment of read-only location '__result.__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >::operator*()'
 4220 |         *__result = __unary_op(*__first);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n,k;
  String s,t;
  cin >> n >> k;
  cin >> s;
  t = s[k-1]-'A'+'a';
  s[k-1]=t;
  cout << s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String s,t;
      |   ^~~~~~
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s;
      |          ^
a.cc:9:3: error: 't' was not declared in this scope
    9 |   t = s[k-1]-'A'+'a';
      |   ^
Language: C++

#include<stdio.h>
int main() {
	int N, K;
	scanf("%d %d", &N, &K);
	K -= 1;
	char S[50] = { 0 };
	scanf("%s", &S);
	char PV[1];
	PV = S[K];
	S[K] = PV[K];
	printf("%s\n", S);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: incompatible types in assignment of 'char' to 'char [1]'
    9 |         PV = S[K];
      |         ~~~^~~~~~
Language: C++

#include<stdio.h>
#include<string>
int main() {
	int N, K;
	scanf("%d %d", &N, &K);
	K -= 1;
	char S[50] = { 0 };
	scanf("%s", &S);
	char PV[50];
	PV = toupr(char S);
	S[K] = PV[K];
	printf("%s\n", S);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before 'char'
   10 |         PV = toupr(char S);
      |                    ^~~~
a.cc:10:14: error: 'toupr' was not declared in this scope; did you mean 'toupper'?
   10 |         PV = toupr(char S);
      |              ^~~~~
      |              toupper
Language: C++

#include<stdio.h>
int main() {
	int N, K;
	scanf("%d %d", &N, &K);
	K -= 1;
	char S[50] = { 0 };
	scanf("%s", &S);
	char PV[50];
	PV = toupr(S);
	S[K] = PV[K];
	printf("%s\n", S);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'toupr' was not declared in this scope
    9 |         PV = toupr(S);
      |              ^~~~~
Language: C++

#include<stdio.h>
int main() {
	int N, K;
	scanf("%d %d", &N, &K);
	K -= 1;
	char S[50] = { 0 };
	scanf("%s", &S);
	char PV[50];
	PV = toupr(char S);
	S[K] = PV[K];
	printf("%s\n", S);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected primary-expression before 'char'
    9 |         PV = toupr(char S);
      |                    ^~~~
a.cc:9:14: error: 'toupr' was not declared in this scope
    9 |         PV = toupr(char S);
      |              ^~~~~
Language: C++

#include<stdio.h>
int main() {
	int N, K;
	scanf("%d %d", &N, &K);
	K -= 1;
	char S[50] = { 0 };
	scanf("%s", &S);
	char PV[1];
	PV[0] = toupr(S[K]);
	S[K] = PV[0];
	printf("%s\n", S);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'toupr' was not declared in this scope
    9 |         PV[0] = toupr(S[K]);
      |                 ^~~~~
Language: C++

#include<stdio.h>
int main(){
  int N,K;
  scanf("%d %d",&N,&K);
  K -= 1;
  char S[N + 1] = {0};
  scanf("%c",&S);
  cher PV[2];
  PV = S[K] - 0*20;
  S[K] = PV;
  printf("%c\n",S);
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cher' was not declared in this scope; did you mean 'char'?
    8 |   cher PV[2];
      |   ^~~~
      |   char
a.cc:9:3: error: 'PV' was not declared in this scope
    9 |   PV = S[K] - 0*20;
      |   ^~
Language: C++

#import<iostream>
main(){int k;std::string s;std::cin>>k>>k>>s;s[k-1]-=('A'-'a');std::puts(s);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int k;std::string s;std::cin>>k>>k>>s;s[k-1]-=('A'-'a');std::puts(s);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:74: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    2 | main(){int k;std::string s;std::cin>>k>>k>>s;s[k-1]-=('A'-'a');std::puts(s);}
      |                                                                          ^
      |                                                                          |
      |                                                                          std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C

#include <stdio.h>
int main(){
	int n,k;
	scanf("%d %d",&n,&k);
	char buf;
	for(i=0;i<n;i++){
		gets(buf);
		if(i+1==k){
			buf=buf+26;
			printf("%s",buf);
		}
		else{
			printf("%s",buf);
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=0;i<n;i++){
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |                 gets(buf);
      |                 ^~~~
      |                 fgets
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数

// デフォルト変数定義
int n,m,a,b,c,x,y,z;
double d,e,f;
string s,t;
//

signed main() {
  RAPID;
  IN3(n,m,s);
  if(s[m-1]=='A') s[m-1]='a';OUT(s);
  else if(s[m-1]=='B') s[m-1]='b';OUT(s);
  else s[m-1]='c';OUT(s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:3: error: 'else' without a previous 'if'
   59 |   else if(s[m-1]=='B') s[m-1]='b';OUT(s);
      |   ^~~~
a.cc:60:3: error: 'else' without a previous 'if'
   60 |   else s[m-1]='c';OUT(s);
      |   ^~~~
Language: C++

var n, k:byte;
s:string;
begin
	readln(n, k);
	readln(s);
	s[k]:=lowercase(s[k]);
	writeln(s);
end.

Compiler output:
a.cc:1:1: error: 'var' does not name a type
    1 | var n, k:byte;
      | ^~~
a.cc:2:2: error: found ':' in nested-name-specifier, expected '::'
    2 | s:string;
      |  ^
      |  ::
a.cc:2:1: error: 's' does not name a type
    2 | s:string;
      | ^
a.cc:3:1: error: 'begin' does not name a type
    3 | begin
      | ^~~~~
a.cc:5:15: error: expected constructor, destructor, or type conversion before '(' token
    5 |         readln(s);
      |               ^
a.cc:6:9: error: 's' does not name a type
    6 |         s[k]:=lowercase(s[k]);
      |         ^
a.cc:7:16: error: expected constructor, destructor, or type conversion before '(' token
    7 |         writeln(s);
      |                ^
a.cc:8:1: error: 'end' does not name a type
    8 | end.
      | ^~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <numeric>
using namespace std;


int main(){
    int N,K;
    cin >> N >> K;
    K = K - 1;
    string S;
    cin >> S;

    if(S.at(K) == 'A'){
        S.at(K) = 'a';
        cout << S << endl;
    }
    else if(S.art(K)=='B'){
        S.at(K) = 'b';
        cout << S << endl;
    }
    else{
        S.at(K) = 'c';
        cout << S << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'art'; did you mean 'at'?
   21 |     else if(S.art(K)=='B'){
      |               ^~~
      |               at
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main()
{
  long long int a,n;
  cin>>a>>n;
  string s;
  for(i=0;i<a;i++)
  {
    if(i=n-1)
    {
      cout<<char(int(s[i]+32));
    }
    else 
    {
      cout<<s[i];
    }
    
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<a;i++)
      |       ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int N, K;
  string S;
  cin >> N >> K >> S;
  S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
  cout << S <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected unqualified-id before '[' token
    9 |   S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
      |     ^
a.cc:9:27: error: expected unqualified-id before '[' token
    9 |   S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
      |                           ^
Language: C++

#include <iostream>
#include <string>

int main()
{
  int N, K;
  string S;
  cin >> N >> K >> S;
  S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
  cout << S <<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string S;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> N >> K >> S;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:20: error: 'S' was not declared in this scope
    8 |   cin >> N >> K >> S;
      |                    ^
a.cc:9:5: error: expected unqualified-id before '[' token
    9 |   S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
      |     ^
a.cc:9:27: error: expected unqualified-id before '[' token
    9 |   S.[K-1] = (char)((int)S.[K-1] + (int)('a'-'A'));
      |                           ^
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << S <<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout << S <<endl;
      |               ^~~~
      |               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
const int INF = 100100100;
using namespace std;

int main()
{
  int N, K;
  char S[51];
  cin >> N >> K >> S;

  S[K-1]+=32;

  cout << S << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> N >> K >> S;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | include <bits/stdc++.h>
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << S << endl;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:16: error: 'endl' was not declared in this scope
   14 |   cout << S << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | include <bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  strin s; cin >> s;
  int k; cin >> k;
  k--;
  if(s.at(k) == 'A') s.at(k) = 'a';
  if(s.at(k) == 'B') s.at(k) = 'b';
  if(s.at(k) == 'C') s.at(k) = 'c';
  cout << s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'strin' was not declared in this scope; did you mean 'stdin'?
    5 |   strin s; cin >> s;
      |   ^~~~~
      |   stdin
a.cc:5:19: error: 's' was not declared in this scope
    5 |   strin s; cin >> s;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,K;
  cin >> N >> K;
  string S;
  cin >> S;
  for (int i = 0; i < N; i++) {
    if (i == K - 1) {
      cout << S.at(i) + 32;
    }
    else {
      cout << S.at(i);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,K;
  cin >> N >> K;
  string S;
  cin >> S;
  for (int i = 0; i < N; i++) {
    if (i == K - 1) {
      cout << 'tolower(S.at(i))';
    }
    else {
      cout << S.at(i);
    }
}


Compiler output:
a.cc:11:15: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
   11 |       cout << 'tolower(S.at(i))';
      |               ^~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  
  ll n,k; cin >> n >> k; k -= 1;
  string s; cin >> s;
  if (s[k] == 'A') s[k] = 'a';
  else if (s[k] == 'B') s[k] = 'b';
  else s[k] = 'c';
  
  puts(s);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |   puts(s);
      |        ^
      |        |
      |        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  
  ll n,k; cin >> n >> k; k -= 1;
  string s; cin >> s;
  if (s[k] == "A") s[k] = a;
  else if (s[k] == "B") s[k] = b;
  else s[k] = c;
  
  puts(s);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if (s[k] == "A") s[k] = a;
a.cc:11:27: error: 'a' was not declared in this scope
   11 |   if (s[k] == "A") s[k] = a;
      |                           ^
a.cc:12:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   else if (s[k] == "B") s[k] = b;
a.cc:12:32: error: 'b' was not declared in this scope
   12 |   else if (s[k] == "B") s[k] = b;
      |                                ^
a.cc:13:15: error: 'c' was not declared in this scope
   13 |   else s[k] = c;
      |               ^
a.cc:15:8: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |   puts(s);
      |        ^
      |        |
      |        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;


int main() {
  string S;
  int N,K;
  cin >> N >> K >> S;
  if(S[K]=='A'){
    S[K]='a';
  }else if(S[K]=='B'){
    S[K]='b';
  }else{
    S[K]='c'
  }
  cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before '}' token
   14 |     S[K]='c'
      |             ^
      |             ;
   15 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;

typeset long long ll;

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

Compiler output:
a.cc:4:1: error: 'typeset' does not name a type; did you mean 'typedef'?
    4 | typeset long long ll;
      | ^~~~~~~
      | typedef
Language: Java

#include<iostream>
#include<string.h>
#include<math.h>

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	string s;
	cin >> s;
	s[b - 1] -= 'A';
	s[b - 1] += 'a';
	cout << s << endl;
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<string.h>
^
Main.java:3: error: illegal character: '#'
#include<math.h>
^
Main.java:9: error: not a statement
	cin >> a >> b;
	         ^
Main.java:11: error: not a statement
	cin >> s;
	    ^
Main.java:14: error: not a statement
	cout << s << endl;
	          ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: C++

#include <iostream>
using namespace std;

int main() {
    int n,k;
    string s;
    //s = "ABCACCCA";
    //n = 8;
    //k = 5;
    cin >> n >> k;
    cin >> s;

    if(s[k-1] == 'A'){
        s[k-1] = 'a';
        std::cout << s << std::endl;
    }else if(s[k-1] == 'B'){
        s[k-1] = 'b';
        std::cout << s << std::endl;
    }else{
        s[k-1] = 'c';
        std::cout << s << std::endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:6: error: expected '}' at end of input
   22 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b;string s;
  cin>>a>>b>>s;
  s[b-1]=tolower(s[b-1])
    cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'cout'
    6 |   s[b-1]=tolower(s[b-1])
      |                         ^
      |                         ;
    7 |     cout<<s;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int n ,k ;
cin>>n>>k;
char s[n];
for (int i =0 ;i<n;i++)
{
    cin>>s[i];
}
s[k-1]= S[K-1]+32;
cout<<s<<" ";


return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'S' was not declared in this scope
   11 | s[k-1]= S[K-1]+32;
      |         ^
a.cc:11:11: error: 'K' was not declared in this scope
   11 | s[k-1]= S[K-1]+32;
      |           ^
Language: C++

#include<iostream>
using namespace std;


int main(){

  int N,K;
  string S;
  cin >> N >> K;
  cin >> S;

  for(int i=0; i<N; i++){
     if(i==K-1){
         S[i] = S[i] + 0x20;
     }
  }
  cout << S << endl;
}
~

Compiler output:
a.cc:19:2: error: expected class-name at end of input
   19 | ~
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N,K;
    cin >> N >> K;
    string S;
    cin >> S;
    if (S.at(K)=='A')
    S.at(K)='a';
    if (S.at(K)=='B')
    S.at(K)='b'
    if (S.at(K)=='C')
    S.at(K)='c'
    cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before 'if'
   12 |     S.at(K)='b'
      |                ^
      |                ;
   13 |     if (S.at(K)=='C')
      |     ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N,K;
    cin >> N >> K;
    string S;
    cin >> S;
    if (S.at(K)==A)
    S.at(K)=a;
    if (A.at(K)==B)
    S.at(K)=b
    if (S.at(K)==C)
    S.at(K)=c
    cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'A' was not declared in this scope
    9 |     if (S.at(K)==A)
      |                  ^
a.cc:10:13: error: 'a' was not declared in this scope
   10 |     S.at(K)=a;
      |             ^
a.cc:11:9: error: 'A' was not declared in this scope
   11 |     if (A.at(K)==B)
      |         ^
a.cc:11:18: error: 'B' was not declared in this scope
   11 |     if (A.at(K)==B)
      |                  ^
a.cc:12:13: error: 'b' was not declared in this scope
   12 |     S.at(K)=b
      |             ^
Language: C++



N, K= list(map(int, input().split()))

S = list(input())


if S[K-1]=="A":
    S[K-1] = 'a'
elif S[K-1] == "B":
    S[K-1] ="b"
else:
    S[K-1] ="c"


for i in range(N):
    print(S[i], end="")


Compiler output:
a.cc:3:1: error: 'N' does not name a type
    3 | N, K= list(map(int, input().split()))
      | ^
Language: Java

import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
 
public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.nextLine();
    
    System.out.println(ss.susbtring(0,k)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
    System.out.println(ss.susbtring(0,k)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
                         ^
  symbol:   method susbtring(int,int)
  location: variable ss of type String
1 error
Language: C

#include<stdio.h>

int main(){
  int n,k;
  scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",s);
  s[k-1] = s[k-1]- 'A' + 'a';
  print("%s",s);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 |   print("%s",s);
      |   ^~~~~
      |   printf
Language: C

#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>



using namespace std;
int main(void){
  int n;
  cin >> n;
  int k;
  cin >> k;
  char s[n];
  cin >> s;
  if(s[k-1]=='A'){
    s[k-1]='a';
    cout << s;
    return 0;
  }
  else if(s[k-1]=='B'){
    s[k-1]='b';
    cout << s;
    return 0;
  }

  else if(s[k-1]=='C'){
    s[k-1]='c';
    cout << s;
    return 0;
  }

  return 0;
}


Compiler output:
main.c:1:10: fatal error: cstdlib: No such file or directory
    1 | #include <cstdlib>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <locale>
using namespace std;

int main(){
  int n,m;
  cin >> n >> m;
  string s;
  cin >> s;
  s.at(m-1)=tolower(s.at(m-1);
  return 0;
                    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ')' before ';' token
   11 |   s.at(m-1)=tolower(s.at(m-1);
      |                    ~         ^
      |                              )
Language: C++

#include <iosteram>
#include <string>
#include <locale>
using namespace std;

int main(){
  int n,m;
  cin >> n >> m;
  string s;
  cin >> s;
  s.at(m-1)=tolower(s.at(m-1);
  return 0;
                    }

Compiler output:
a.cc:1:10: fatal error: iosteram: No such file or directory
    1 | #include <iosteram>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<stdlib.h>
#include <string.h>
 
int main(){
	int n,k;
	scanf("%d",&n);
	scanf("%d",&k);
	char s[n];
	scanf("%s",&s);

		if(s[k-1]=="A"){
			s[k-1]="a";}
			
		else if(s[k-1]=="B"){
			s[k-1]="b";}
			
		else  s[k-1]="c";

printf("%c",s);
    return 0;
 

Compiler output:
main.c: In function 'main':
main.c:12:26: warning: comparison between pointer and integer
   12 |                 if(s[k-1]=="A"){
      |                          ^~
main.c:13:31: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   13 |                         s[k-1]="a";}
      |                               ^
main.c:15:31: warning: comparison between pointer and integer
   15 |                 else if(s[k-1]=="B"){
      |                               ^~
main.c:16:31: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   16 |                         s[k-1]="b";}
      |                               ^
main.c:18:29: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   18 |                 else  s[k-1]="c";
      |                             ^
main.c:21:5: error: expected declaration or statement at end of input
   21 |     return 0;
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long                                    // long long省略
#define pb push_back                                    // push_back省略
#define mp make_pair                                    // make_pair省略
#define fi first                                        // first省略
#define se second                                       // second省略
#define itn int                                         // int誤字保険
#define count cout                                      // cout誤字保険
#define vecotr vector                                   // vector誤字保険
#define ednl endl                                       // endl誤字保険
#define opt() cin.tie(0); ios::sync_with_stdio(false)   // 入出力速度改善

#define rep(i,l,r) for(ll i=(l);i<(r);i++)               // 範囲[l, r)で刻み1のfor文(順方向)
#define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k))         // 範囲[l, r)で刻みkのfor文(順方向)
#define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--)           // 範囲[l, r)で刻み1のfor文(逆方向)
#define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k))     // 範囲[l, r)で刻みkのfor文(逆方向)
#define all(x) (x).begin(), (x).end()                   // vectorのポインタ位置指定用
#define max(p,q)((p)>(q)?(p):(q))                       // max拡張
#define min(p,q)((p)<(q)?(p):(q))                       // min拡張
#define bit(n,m)(((n)>>(m))&1)                          // 変数nのm番目のbitを取り出す

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 1, 0, -1};                                 // 4方向近傍
int dx[]={1, 0, -1, 0};                                 // 4方向近傍

int main(){
    ll a,b;cin>>a>>b;
  	string s; cin>>s;
  	cout << str.substr(0,b-1) << s[b] - 'A' + 'a' << str.substr(b+1,n-(b+1)) << ednl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'str' was not declared in this scope; did you mean 'std'?
   32 |         cout << str.substr(0,b-1) << s[b] - 'A' + 'a' << str.substr(b+1,n-(b+1)) << ednl;
      |                 ^~~
      |                 std
a.cc:32:73: error: 'n' was not declared in this scope
   32 |         cout << str.substr(0,b-1) << s[b] - 'A' + 'a' << str.substr(b+1,n-(b+1)) << ednl;
      |                                                                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long                                    // long long省略
#define pb push_back                                    // push_back省略
#define mp make_pair                                    // make_pair省略
#define fi first                                        // first省略
#define se second                                       // second省略
#define itn int                                         // int誤字保険
#define count cout                                      // cout誤字保険
#define vecotr vector                                   // vector誤字保険
#define ednl endl                                       // endl誤字保険
#define opt() cin.tie(0); ios::sync_with_stdio(false)   // 入出力速度改善

#define rep(i,l,r) for(ll i=(l);i<(r);i++)               // 範囲[l, r)で刻み1のfor文(順方向)
#define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k))         // 範囲[l, r)で刻みkのfor文(順方向)
#define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--)           // 範囲[l, r)で刻み1のfor文(逆方向)
#define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k))     // 範囲[l, r)で刻みkのfor文(逆方向)
#define all(x) (x).begin(), (x).end()                   // vectorのポインタ位置指定用
#define max(p,q)((p)>(q)?(p):(q))                       // max拡張
#define min(p,q)((p)<(q)?(p):(q))                       // min拡張
#define bit(n,m)(((n)>>(m))&1)                          // 変数nのm番目のbitを取り出す

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 1, 0, -1};                                 // 4方向近傍
int dx[]={1, 0, -1, 0};                                 // 4方向近傍

int main(){
    ll a,b;cin>>a>>b;
  	string s; cin>>s;
  	cout << s[0:b] << s[b] - 'A' + 'a' << s[b+1:n] << ednl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:20: error: expected ']' before ':' token
   32 |         cout << s[0:b] << s[b] - 'A' + 'a' << s[b+1:n] << ednl;
      |                    ^
      |                    ]
a.cc:32:20: error: expected ';' before ':' token
   32 |         cout << s[0:b] << s[b] - 'A' + 'a' << s[b+1:n] << ednl;
      |                    ^
      |                    ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int n,k;
  cin >> n >> k;
  string s;
  cin >> s;
  if(s[k-1]=="A"){
    s[k-1]="a";
  }
  else if(s[k-1]=="B"){
    s[k-1]="b";
  }
  else{
    s[k-1]="c";
  }
  cout << s << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[k-1]=="A"){
a.cc:11:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |     s[k-1]="a";
      |            ^~~
      |            |
      |            const char*
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   else if(s[k-1]=="B"){
a.cc:14:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   14 |     s[k-1]="b";
      |            ^~~
      |            |
      |            const char*
a.cc:17:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   17 |     s[k-1]="c";
      |            ^~~
      |            |
      |            const char*
Language: C

#include<stdio.h>
int main(){
  char s='a';
  a+=32;
  printf("%c",s);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: 'a' undeclared (first use in this function)
    4 |   a+=32;
      |   ^
main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int n,k;
  string s;
  
  cin >>n>>k>>s;
  
  if(s.at(k-1) == A)
    s.at(k-1) = a;
  if(s.at(k-1) == B)
    s.at(k-1) = b;
  if(s.at(k-1) == C)
    s.at(k-1) = c;
  
  cout <<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'A' was not declared in this scope
   10 |   if(s.at(k-1) == A)
      |                   ^
a.cc:11:17: error: 'a' was not declared in this scope
   11 |     s.at(k-1) = a;
      |                 ^
a.cc:12:19: error: 'B' was not declared in this scope
   12 |   if(s.at(k-1) == B)
      |                   ^
a.cc:13:17: error: 'b' was not declared in this scope
   13 |     s.at(k-1) = b;
      |                 ^
a.cc:14:19: error: 'C' was not declared in this scope
   14 |   if(s.at(k-1) == C)
      |                   ^
a.cc:15:17: error: 'c' was not declared in this scope
   15 |     s.at(k-1) = c;
      |                 ^
Language: C++

int main() {
  
  int N,K;
  cin >> N >> K;
  string S;
  cin >> S;
  if(S.at(K-1)=='A'){
    S.at(K-1)='a';
  }
  if(S.at(K-1)=='B'){
    S.at(K-1)='b';
  }
  if(S.at(K-1)=='C'){
    S.at(K-1)='c';
  }
  cout << S << endl;
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N >> K;
      |   ^~~
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << S << endl;
      |   ^~~~
a.cc:16:16: error: 'endl' was not declared in this scope
   16 |   cout << S << endl;
      |                ^~~~
Language: C++

#include <bits/stdc++.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i<(n); i++)
using namespace std;
typedef long long ll;
static const int MAX = 200000; 
//pi = 3.14159265358979323846
​
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  
  s[k - 1] += 0x20;
  
  cout << s << endl;
}

Compiler output:
a.cc:8:1: error: '\U0000200b' does not name a type
    8 | ​
      |
Language: C++

#include<iostream>
using namespace std;
int main(void){
    int a,b;
    string s;
    cin >> a >> b >> s;
  b--;
  if(s.s.at(b) < 68){
    s.at(b) = (char)(s.at(b) + 32);
    cout << s;
  }else{
    s.at(b) = (char)(s.at(b) - 32);
    cout << s;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 's'
    8 |   if(s.s.at(b) < 68){
      |        ^
Language: C++

#include<iostream>
using namespace std;
int main(void){
    int a,b;
    string s;
    cin >> a >> b >> s;
  if(s.s.at(b) < 68){
    s.at(b) = (char)(s.at(b) + 32);
    cout << s;
  }else{
    s.at(b) = (char)(s.at(b) - 32);
    cout << s;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 's'
    7 |   if(s.s.at(b) < 68){
      |        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
using namespace std;
int main()
{
    int n, k;
    char s;
    cin >> n >> k >> s;
    s[k - 1] += 32;
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: invalid types 'char[int]' for array subscript
   12 |     s[k - 1] += 32;
      |      ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  string S;
  cin >> S;
  transform(S[K], S[K], S[K], std::tolower);
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'transform' was not declared in this scope
    8 |   transform(S[K], S[K], S[K], std::tolower);
      |   ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
  int N, K;
  cin >> N >> K;
  string S;
  cin >> S;
  if (S[K-1] == 'A') {
    s[K-1] = 'a';
  } else if (s[K-1] == 'B') {
    s[K - 1] = 'b';
  } else {
    s[K-1] = 'c';
  }
  cout << S << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s[K-1] = 'a';
      |     ^
a.cc:13:14: error: 's' was not declared in this scope
   13 |   } else if (s[K-1] == 'B') {
      |              ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}
char chlit(char c){return c+32;}
char chbig(char c){return c-32;}

int main(){
  int n,k;cin >> n >> k
  string s;cin >> s;
  for(int i=0;i<n;++i){
    if(i == k-1)cout << chlit(s[i]);
    else cout << s[i];
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'string'
   13 |   int n,k;cin >> n >> k
      |                        ^
      |                        ;
   14 |   string s;cin >> s;
      |   ~~~~~~                
a.cc:14:19: error: 's' was not declared in this scope
   14 |   string s;cin >> s;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b;
  string s;
  cin >> a>>b>>s;
  
  s[b-1] = tolower(s[b-1]);
  

   cout << s <<endl;
 }
}
  




Compiler output:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,K;
  cin>>N>>K;
  string S;
  cin>>S;
  if(S[K]=='A'){
    S[K]='a'
  }
  if(S[K]=='B'){
    S[K]='b'
  }
  if(S[K]=='C'){
    S[K]='c'
  }
 cout<<S<<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before '}' token
   10 |     S[K]='a'
      |             ^
      |             ;
   11 |   }
      |   ~          
a.cc:13:13: error: expected ';' before '}' token
   13 |     S[K]='b'
      |             ^
      |             ;
   14 |   }
      |   ~          
a.cc:16:13: error: expected ';' before '}' token
   16 |     S[K]='c'
      |             ^
      |             ;
   17 |   }
      |   ~
Language: C++

#include <string>
//typedef long long LL;
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n >> k;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | //typedef long long LL;
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << s << endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |     cout << s << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | //typedef long long LL;
Language: C++

#include <bits/stdc++.h>
#include<string>
using namespace std;

int main() {
int N; int K; string S;
  cin>>N>>K;
  cin>>S;
  transform(S.at(K),S.at(K),::tolower);
  cout<<S<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: no matching function for call to 'transform(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&, int (&)(int) noexcept)'
    9 |   transform(S.at(K),S.at(K),::tolower);
      |   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
 4209 |     transform(_InputIterator __first, _InputIterator __last,
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note:   candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
 4247 |     transform(_InputIterator1 __first1, _InputIterator1 __last1,
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note:   candidate expects 5 arguments, 3 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
  156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
      | ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note:   candidate expects 5 arguments, 3 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
  162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note:   candidate expects 6 arguments, 3 provided