criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  int wordLong , cngInt;
  string a;
  cin >> a >> cngInt;
  
  //for(i=0;i<a.size()
  char cngChar = a.at(chgInt);
  if(cngChar == 'A'){
    a.at(cngInt) = 'a';
  }else if(cngChar == 'B' ){
    a.at(cngInt) = 'b';
  } else if(cngChar == 'C'){
    a.at(cngInt) = 'c';
  }
  cout << a << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'chgInt' was not declared in this scope; did you mean 'cngInt'?
   11 |   char cngChar = a.at(chgInt);
      |                       ^~~~~~
      |                       cngInt
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'a' was not declared in this scope
   10 |   A = a;
      |       ^
a.cc:14:8: error: 'b' was not declared in this scope
   14 |    B = b;
      |        ^
a.cc:18:9: error: 'c' was not declared in this scope
   18 |     C = c;
      |         ^
Language: C++

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

int main(){
  
  int wordLong , cngInt;
  string a;
  cin >> a >> cngInt;
  cout << a.size() << endl;
  //for(i=0;i<a.size()
  char cngChar = a.at(chgInt);
  if(cngChar == 'A'){
    a.at(cngInt) = 'a';
  }else if(cngChar == 'B' ){
    a.at(cngInt) = 'b';
  } else if(cngChar == 'C'){
    a.at(cngInt) = 'c';
  }
  cout << a << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'chgInt' was not declared in this scope; did you mean 'cngInt'?
   11 |   char cngChar = a.at(chgInt);
      |                       ^~~~~~
      |                       cngInt
Language: C++

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

int main(){
  
  int wordLong , cngInt;
  string a;
  cin >> a >> cngInt;
  cout << a.size() << endl;
  //for(i=0;i<a.size()
  char cngChar = a.at(chgInt);
  if(cngChar == 'A'){
    a.at(chgInt) = 'a';
  }else if(cngChar == 'B' ){
    a.at(chgInt) = 'b';
  } else if(cngChar == 'C'){
    a.at(chgInt) = 'c';
  }
  cout << a << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'chgInt' was not declared in this scope; did you mean 'cngInt'?
   11 |   char cngChar = a.at(chgInt);
      |                       ^~~~~~
      |                       cngInt
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'a' was not declared in this scope
   10 |   A = a;
      |       ^
a.cc:14:8: error: 'b' was not declared in this scope
   14 |    B = b;
      |        ^
a.cc:17:22: error: expected ';' before '{' token
   17 |   else (S.at(K) == C) {
      |                      ^~
      |                      ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'A' was not declared in this scope
    9 |   if(S.at(K) == A){
      |                 ^
a.cc:10:7: error: 'a' was not declared in this scope
   10 |   A = a;
      |       ^
a.cc:13:23: error: 'B' was not declared in this scope
   13 |   else if (S.at(K) == B){
      |                       ^
a.cc:14:8: error: 'b' was not declared in this scope
   14 |    B = b;
      |        ^
a.cc:17:20: error: 'C' was not declared in this scope
   17 |   else (S.at(K) == C) {
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  char abc;
  cin >> a >> b >> abc;
  abc[b-1] += 32;
  cout << abc << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  char abc[];
  cin >> a >> b >> abc;
  abc[b-1] += 32;
  cout << abc << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: storage size of 'abc' isn't known
    5 |   char abc[];
      |        ^~~
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 s = sc.next();
      	s.indexOf(k)-='A'-'a';
		// 出力
		System.out.println(s);
	}
}

Compiler output:
Main.java:11: error: variable s is already defined in method main(String[])
		String s = sc.next();
		       ^
Main.java:12: error: unexpected type
      	s.indexOf(k)-='A'-'a';
      	         ^
  required: variable
  found:    value
2 errors
Language: C++

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 s = sc.next();
      	s.indexOf(k)-='A'-'a';
		// 出力
		System.out.println(s);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

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

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

  char *X = &S.substr(K - 1, 1);
  char x = S.substr(K - 1, 1);

  if (x == 'A')
    *X = 'a';
  else if (x == 'B')
    *X = 'b';
  else
    *X = 'c';

  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: taking address of rvalue [-fpermissive]
   11 |   char *X = &S.substr(K - 1, 1);
      |              ~~~~~~~~^~~~~~~~~~
a.cc:11:13: error: cannot convert 'std::__cxx11::basic_string<char>*' to 'char*' in initialization
   11 |   char *X = &S.substr(K - 1, 1);
      |             ^~~~~~~~~~~~~~~~~~~
      |             |
      |             std::__cxx11::basic_string<char>*
a.cc:12:20: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in initialization
   12 |   char x = S.substr(K - 1, 1);
      |            ~~~~~~~~^~~~~~~~~~
      |                    |
      |                    std::__cxx11::basic_string<char>
Language: C++

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

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

  char *X = &S.substr(K - 1, 1);

  if (X == 'A')
    X = 'a';
  else if (X == 'B')
    X = 'b';
  else
    X = 'c';

  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: taking address of rvalue [-fpermissive]
   11 |   char *X = &S.substr(K - 1, 1);
      |              ~~~~~~~~^~~~~~~~~~
a.cc:11:13: error: cannot convert 'std::__cxx11::basic_string<char>*' to 'char*' in initialization
   11 |   char *X = &S.substr(K - 1, 1);
      |             ^~~~~~~~~~~~~~~~~~~
      |             |
      |             std::__cxx11::basic_string<char>*
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if (X == 'A')
      |       ~~^~~~~~
a.cc:14:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   14 |     X = 'a';
      |         ^~~
      |         |
      |         char
a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   else if (X == 'B')
      |            ~~^~~~~~
a.cc:16:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   16 |     X = 'b';
      |         ^~~
      |         |
      |         char
a.cc:18:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   18 |     X = 'c';
      |         ^~~
      |         |
      |         char
Language: C++

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

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

  char *X = S.substr(K - 1, 1);

  if (X == 'A')
    X = 'a';
  else if (X == 'B')
    X = 'b';
  else
    X = 'c';

  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char*' in initialization
   11 |   char *X = S.substr(K - 1, 1);
      |             ~~~~~~~~^~~~~~~~~~
      |                     |
      |                     std::__cxx11::basic_string<char>
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if (X == 'A')
      |       ~~^~~~~~
a.cc:14:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   14 |     X = 'a';
      |         ^~~
      |         |
      |         char
a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   else if (X == 'B')
      |            ~~^~~~~~
a.cc:16:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   16 |     X = 'b';
      |         ^~~
      |         |
      |         char
a.cc:18:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   18 |     X = 'c';
      |         ^~~
      |         |
      |         char
Language: C++

#include <iostream>
#include <string>

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

  char *X = S.substr(K - 1, 1);

  if (X == 'A')
    X = 'a';
  else if (X == 'B')
    X = 'b';
  else
    X = 'c';

  cout << S << endl;
}

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:12:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if (X == 'A')
      |       ~~^~~~~~
a.cc:13:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   13 |     X = 'a';
      |         ^~~
      |         |
      |         char
a.cc:14:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   else if (X == 'B')
      |            ~~^~~~~~
a.cc:15:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   15 |     X = 'b';
      |         ^~~
      |         |
      |         char
a.cc:17:9: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   17 |     X = 'c';
      |         ^~~
      |         |
      |         char
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   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:19:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   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>
using namespace std;
 int main() {
   int N,K; 
   cin >> N >> K;
   vector<string> S(N);
   for(int i = 0;i < N;i++){
     cin >> S.at(i);
   }
   for(int j = 0;j < N;j++){
     cout << S.at(j);
     if(j == K - 1){
       if(S.at(j) == "A"){
         cout << "a";
       }
       if(S.at(j) == "B"){
         cout << "b";
       }
       if(S.at(j) == "C"){
         cout << "c";
       }
     }
   }
 }
}
   
   

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

#include <iostream>
int main(){
	int n,k; cin >> n >> k;
	for(int i=1;i<=n;i++){
		char in;	cin >> in;
		if(i==k){
			if(in=='A')		cout << 'a';
			else if(in=='B')	cout << 'b';
			else				cout << 'c';
		}else{
			cout << in;
		}
	}
	cout <<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 |         int n,k; cin >> n >> k;
      |                  ^~~
      |                  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:49: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                         if(in=='A')             cout << 'a';
      |                                                 ^~~~
      |                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:49: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |                         else if(in=='B')        cout << 'b';
      |                                                 ^~~~
      |                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:57: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                         else                            cout << 'c';
      |                                                         ^~~~
      |                                                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |                         cout << in;
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout <<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:14:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |         cout <<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

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

  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'k' was not declared in this scope
   13 |     if(i==k-1)
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n, k;
  char str[100];
  cin >> n >> k >> str;
  str[k-1]=tolower(str);
  cout << str;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'tolower(char [100])'
    7 |   str[k-1]=tolower(str);
      |            ~~~~~~~^~~~~
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)' (near match)
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:12: note:   conversion of argument 1 would be ill-formed:
a.cc:7:20: error: invalid conversion from 'char*' to 'int' [-fpermissive]
    7 |   str[k-1]=tolower(str);
      |                    ^~~
      |                    |
      |                    char*
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n, k;
  char str[100];
  cin >> n >> k >> str;
  str[k-1]=tolower("str");
  cout << "str";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'tolower(const char [4])'
    7 |   str[k-1]=tolower("str");
      |            ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)' (near match)
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:12: note:   conversion of argument 1 would be ill-formed:
a.cc:7:20: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    7 |   str[k-1]=tolower("str");
      |                    ^~~~~
      |                    |
      |                    const char*
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

var n, k, i : integer;
    c : array[1..50] of char;
begin
  readln(n, k);
  for i := 1 to n do read(c[i]);
  if c[k] = 'A' then c[k] := 'a';
  if c[k] = 'B' then c[k] := 'b';
  if c[k] = 'C' then c[k] := 'c';
  for i := 1 to n do write(c[i]);
end.

Compiler output:
a.cc:2:15: error: too many decimal points in number
    2 |     c : array[1..50] of char;
      |               ^~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var n, k, i : integer;
      | ^~~
a.cc:2:7: error: found ':' in nested-name-specifier, expected '::'
    2 |     c : array[1..50] of char;
      |       ^
      |       ::
a.cc:2:5: error: 'c' does not name a type
    2 |     c : array[1..50] of char;
      |     ^
a.cc:3:1: error: 'begin' does not name a type
    3 | begin
      | ^~~~~
a.cc:5:3: error: expected unqualified-id before 'for'
    5 |   for i := 1 to n do read(c[i]);
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if c[k] = 'A' then c[k] := 'a';
      |   ^~
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if c[k] = 'B' then c[k] := 'b';
      |   ^~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if c[k] = 'C' then c[k] := 'c';
      |   ^~
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for i := 1 to n do write(c[i]);
      |   ^~~
a.cc:10:1: error: 'end' does not name a type
   10 | end.
      | ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	int N, K;
  	cin >> N >> K;
  	string S;
  	cin >> S;
  	S[k-1] += 32;
  	cout << S;
}

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

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int s,n,k,a,b,c,A,B,C;
    string  str;

    cin >> n >> k;
    cin >> str;

    if (str.at(k-1) == "A"){

        str.at(k-1) = "a";

    }else if (str.at(k-1) == "B"){

        str.at(k-1) = "b";

    }else{

        str.at(k-1) = "c";

}



cout << str << endl;



//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   46 |     if (str.at(k-1) == "A"){
      |         ~~~~~~~~~~~~^~~~~~
a.cc:48:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   48 |         str.at(k-1) = "a";
      |                       ^~~
      |                       |
      |                       const char*
a.cc:50:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   50 |     }else if (str.at(k-1) == "B"){
      |               ~~~~~~~~~~~~^~~~~~
a.cc:52:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   52 |         str.at(k-1) = "b";
      |                       ^~~
      |                       |
      |                       const char*
a.cc:56:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   56 |         str.at(k-1) = "c";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int s,n,k,a,b,c,A,B,C;
    string  str;

    cin >> n >> k;
    cin >> str;

    if (str.at(k-1) = "A"){

        str.at(k-1) = "a";

    }else if (str.at(k-1) = "B"){

        str.at(k-1) = "b";

    }else{

        str.at(k-1) = "c";

}



cout << str << endl;



//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   40 |     if (str.at(k-1) = "A"){
      |                       ^~~
      |                       |
      |                       const char*
a.cc:42:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   42 |         str.at(k-1) = "a";
      |                       ^~~
      |                       |
      |                       const char*
a.cc:44:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   44 |     }else if (str.at(k-1) = "B"){
      |                             ^~~
      |                             |
      |                             const char*
a.cc:46:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   46 |         str.at(k-1) = "b";
      |                       ^~~
      |                       |
      |                       const char*
a.cc:50:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   50 |         str.at(k-1) = "c";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int n,k,a,b,c,A,B,C;
string  str = s;

cin >> n >>k;
cin >> s;

if (str.at(k-1) = a){

str.at(k-1) = A;

}else if (str.at(k-1) = b){

str.at(k-1) = B;

}else{

str.at(k-1) = C;

}



cout << s << endl;



//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:15: error: 's' was not declared in this scope
   41 | string  str = s;
      |               ^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int n,k,a,b,c,A,B,C;
string  str = s;

cin >> n >>k;
cin >> s;

if (str.at(k-1) = a){

str.at(k-1) = A

}else if (str.at(k-1) = b){

str.at(k-1) = B

}else{

str.at(k-1) = C

}


cout << s << endl;



//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:15: error: 's' was not declared in this scope
   41 | string  str = s;
      |               ^
a.cc:48:16: error: expected ';' before '}' token
   48 | str.at(k-1) = A
      |                ^
      |                ;
   49 | 
   50 | }else if (str.at(k-1) = b){
      | ~               
a.cc:52:16: error: expected ';' before '}' token
   52 | str.at(k-1) = B
      |                ^
      |                ;
   53 | 
   54 | }else{
      | ~               
a.cc:56:16: error: expected ';' before '}' token
   56 | str.at(k-1) = C
      |                ^
      |                ;
   57 | 
   58 | }
      | ~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int n,k,a,b,c,A,B,C;
string  s;

cin >> n >>k;
cin >> s;

if (str.at(k-1) = a){

str.at(k-1) = A

}else if (str.at(k-1) = b){

str.at(k-1) = B

}else{

str.at(k-1) = C

}


cout << s << endl;



//////////////////////////////////////////////////////
return 0;}





Compiler output:
a.cc: In function 'int main()':
a.cc:46:5: error: 'str' was not declared in this scope; did you mean 'std'?
   46 | if (str.at(k-1) = a){
      |     ^~~
      |     std
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<climits>
#include<bitset>
#include<bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define INF INT_MAX
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int> >
#define vvi vector<vector<int> >
#define vvc vector<vector<char> >
#define vvs vector<vector<string> >
#define P 1000000007
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const long long LLINF=1LL<<60;
//set<int>::iterator it;


int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////

int n,k;
str s[n]={};

cin >> n >>k;
cin >> s;

if (str.at(k-1) = a){

str.at(k-1) = A

}else if (str.at(k-1) = b){

str.at(k-1) = B

}else{

str.at(k-1) = C

}


cout << s << endl;



//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:1: error: 'str' was not declared in this scope; did you mean 'std'?
   41 | str s[n]={};
      | ^~~
      | std
a.cc:44:8: error: 's' was not declared in this scope
   44 | cin >> s;
      |        ^
a.cc:46:19: error: 'a' was not declared in this scope
   46 | if (str.at(k-1) = a){
      |                   ^
a.cc:48:15: error: 'A' was not declared in this scope
   48 | str.at(k-1) = A
      |               ^
a.cc:50:25: error: 'b' was not declared in this scope
   50 | }else if (str.at(k-1) = b){
      |                         ^
a.cc:52:15: error: 'B' was not declared in this scope
   52 | str.at(k-1) = B
      |               ^
a.cc:56:15: error: 'C' was not declared in this scope
   56 | str.at(k-1) = C
      |               ^
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();
      
      //変換
      char[] A = S.toCharArray();
      
      char sabun = "A"-"a";
      
      char A[N-1] = A[N-1]-sabun;
      
      
        // 出力
        System.out.println(A);
    }
}

Compiler output:
Main.java:16: error: ']' expected
      char A[N-1] = A[N-1]-sabun;
             ^
Main.java:16: error: not a statement
      char A[N-1] = A[N-1]-sabun;
              ^
Main.java:16: error: ';' expected
      char A[N-1] = A[N-1]-sabun;
                ^
Main.java:16: error: not a statement
      char A[N-1] = A[N-1]-sabun;
                          ^
4 errors
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();
      
      //変換
      char[] A = S.toCharArray();
      
      char A[N-1] = toLowerCase(char A[N-1]);
      
      
        // 出力
        System.out.println(A);
    }
}

Compiler output:
Main.java:14: error: ']' expected
      char A[N-1] = toLowerCase(char A[N-1]);
             ^
Main.java:14: error: not a statement
      char A[N-1] = toLowerCase(char A[N-1]);
              ^
Main.java:14: error: ';' expected
      char A[N-1] = toLowerCase(char A[N-1]);
                ^
Main.java:14: error: '.class' expected
      char A[N-1] = toLowerCase(char A[N-1]);
                                     ^
Main.java:14: error: not a statement
      char A[N-1] = toLowerCase(char A[N-1]);
                                      ^
Main.java:14: error: ';' expected
      char A[N-1] = toLowerCase(char A[N-1]);
                                           ^
6 errors
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(S.at(K)=="A"){
      |      ~~~~~~~^~~~~
a.cc:10:4: error: 's' was not declared in this scope
   10 |    s.at(K)="a";
      |    ^
a.cc:12:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |   else if(S.at(K)="B"){
      |                   ^~~
      |                   |
      |                   const char*
a.cc:13:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   13 |    S.at(K)="b";
      |            ^~~
      |            |
      |            const char*
a.cc:16:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |    S.at(K)="c";
      |            ^~~
      |            |
      |            const char*
Language: C++

#include <cctype>
using namespace std;
 
int main() {
  int N, K;
  string S;
  cin >> N >> K;
  cin >> S;
  int c = S[K-1];
  S[K-1] = tolower(c);
  cout << S << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S;
      |   ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <cctype>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 <cctype>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:10: error: 'S' was not declared in this scope
    8 |   cin >> S;
      |          ^
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout << S << endl;
      |   ^~~~
a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:16: 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 <cctype>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <iostream>
#include <cctype>
using namespace std;

int main() {
  int N, K;
  string S;
  cin >> N >> K;
  cin >> S;
  cout << S.substr(0,K-1) << tolower(S.substr(K,1)) << S.substr(K) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: no matching function for call to 'tolower(std::__cxx11::basic_string<char>)'
   10 |   cout << S.substr(0,K-1) << tolower(S.substr(K,1)) << S.substr(K) << endl;
      |                              ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int K;
  cin >> N >> K;
  
  string str;
  cin >> str;
  
  transform(str[K], str[K], str[K], tolower);
 
  cout << str;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12: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&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&, <unresolved overloaded function type>)'
   12 |   transform(str[K], str[K], str[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:   template argument deduction/substitution failed:
a.cc:12:12: note:   couldn't deduce template parameter '_UnaryOperation'
   12 |   transform(str[K], str[K], str[K], tolower);
      |   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 4 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, 4 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, 4 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int K;
  cin >> N >> K;
  
  char str[100];
  for(int i=0; i < N; i++){
    cin >> str[i];
  }
  transform(str[K]);
  for(int i=0; i < N; i++){
    cout << str[i];
  }
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: no matching function for call to 'transform(char&)'
   13 |   transform(str[K]);
      |   ~~~~~~~~~^~~~~~~~
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, 1 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, 1 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, 1 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, 1 provided
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

N,K=map(int,input().split())
S=input()
for i,m in enumerate(S):
    if m=="A":
        S[i]="A"
    if m=="B":
        S[i]="B"
    if m=="C"
        S[i]="C"
print(S)


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

#include <stdio.h>
int main(void){
    int N,K;
  	char s[100];
  	scanf("%d%d",&N,&K);
  	scanf("%s",s);
  	if(s[K-1]=='A'){
    	s[K-1]=='a';
    }
  	else if(s[K-1]=='B'){
    	s[K-1]=='b';
    }
  	else if(s[K-1]=='C'){
    	s[K-1]=='c';
    }
    printf("%s",s)
}


Compiler output:
main.c: In function 'main':
main.c:16:19: error: expected ';' before '}' token
   16 |     printf("%s",s)
      |                   ^
      |                   ;
   17 | }
      | ~
Language: C++

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

int main() {
  int N,K;
  string S;
  cin>>N>>K;
  cin>>S;
  S[K]-='A';
  S[k]+='a';
  cout<<S;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'k' was not declared in this scope
   11 |   S[k]+='a';
      |     ^