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

#include "bits"#include "bits/stdc++.h"
#define MAXN 100009
#define INF 1000000007
#define mp(x,y) make_pair(x,y)
#define all(v) v.begin(),v.end()
#define pb(x) push_back(x)
#define wr cout<<"----------------"<<endl;
#define ppb() pop_back()
#define tr(ii,c) for(__typeof((c).begin()) ii=(c).begin();ii!=(c).end();ii++)
#define ff first
#define ss second
#define my_little_dodge 46
#define debug(x)  cerr<< #x <<" = "<< x<<endl;
using namespace std;

typedef long long ll;
typedef pair<int,int> PII;
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
int main(){
    int n,k;string s;
    cin>>n>>k>>s;
    s[k-1]=tolower(s[k-1]);
    cout<<s<<endl;
	return 0;
}


Compiler output:
a.cc:1:16: warning: extra tokens at end of #include directive
    1 | #include "bits"#include "bits/stdc++.h"
      |                ^
a.cc:1:10: fatal error: bits: No such file or directory
    1 | #include "bits"#include "bits/stdc++.h"
      |          ^~~~~~
compilation terminated.
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'c' was not declared in this scope
   15 |       d[b] = c;
      |              ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'c' was not declared in this scope
    9 |         cin >> c;
      |                ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   15 |       c[b] = c;
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'A' was not declared in this scope
   10 |         if(c[b]==A)
      |                  ^
a.cc:12:23: error: 'B' was not declared in this scope
   12 |         else if(c[b]==B)
      |                       ^
a.cc:15:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   15 |       c[b] = c;
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

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


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

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

int N,X;
string A;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'S' was not declared in this scope
   11 |   if(S[X-1] == 'A'){
      |      ^
Language: C++

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

int N,X;
string S;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'A' was not declared in this scope
   12 |     A[X-1] = 'a';
      |     ^
a.cc:15:5: error: 'A' was not declared in this scope
   15 |     A[X-1] = 'b';
      |     ^
a.cc:18:5: error: 'A' was not declared in this scope
   18 |     A[X-1] = 'c';
      |     ^
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] == 'A'){
    S[K] = 'a';
  }else if(S[K] == 'B'){
    S[K] = 'b';
  }else{
    S[K] = 'c';
  }
  
  cout << S;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'K'
    7 |   int N K;cin >> N >> K;
      |         ^
a.cc:7:18: error: 'N' was not declared in this scope
    7 |   int N K;cin >> N >> K;
      |                  ^
a.cc:7:23: error: 'K' was not declared in this scope
    7 |   int N K;cin >> N >> K;
      |                       ^
Language: Java

import java.util.*;

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.nextLine();

	char S.charAt(K) = S.charAt(K).toUpperCase();

	System.out.println(S);
	

  }
 }

Compiler output:
Main.java:15: error: ';' expected
	char S.charAt(K) = S.charAt(K).toUpperCase();
	      ^
1 error
Language: Java

import java.util.*;

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.nextLine();

	String T = S.charAt(K);

	String T = T.toUpperCase();

	System.out.println(S);
	

  }
 }

Compiler output:
Main.java:15: error: incompatible types: char cannot be converted to String
	String T = S.charAt(K);
	                   ^
Main.java:17: error: variable T is already defined in method main(String[])
	String T = T.toUpperCase();
	       ^
2 errors
Language: C

#include<stdio.h>
#include<string.h>
char mian(){
  char S[50];
  int p;
  scanf("%s",S);
  scanf("%d",&p);
  if(S[p-1]=='A')S[p-1]='a';
    else if(S[p-1]=='B')S[p-1]='b';
    else if(S[p-1]=='C')S[p-1]='c';
      printf("%s",S);
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<string.h>
int mian(){
  char S[50];
  int p;
  scanf("%s",S);
  scanf("%d",&p);
  if(S[p-1]=='A')S[p-1]='a';
    else if(S[p-1]=='B')S[p-1]='b';
    else if(S[p-1]=='C')S[p-1]='c';
      printf("%s",S);
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>

int mian(){
  char S[50];
  int p;
  scanf("%s",S);
  scanf("%d",&p);
  if(S[p-1]=='A')S[p-1]='a';
    else if(S[p-1]=='B')S[p-1]='b';
    else if(S[p-1]=='C')S[p-1]='c';
      printf("%s",S);
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>

int mian(){
  char S[50];
  int p;
  scanf("%s",S);
  scanf("%d",&p);
  if(S[p-1]=='A')S[p-1]='a'
    else if(S[p-1]=='B')S[p-1]='b' 
    else if(S[p-1]=='C')S[p-1]='c'
      printf("%s",S);
  return 0;
}

Compiler output:
main.c: In function 'mian':
main.c:8:28: error: expected ';' before 'else'
    8 |   if(S[p-1]=='A')S[p-1]='a'
      |                            ^
      |                            ;
    9 |     else if(S[p-1]=='B')S[p-1]='b'
      |     ~~~~
Language: C++

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

main(){
  int k;
  char s[50];
  
  cin >> k;
  scanf("%s",s);
  
  s[k] = s[k] - 0x20
    
   cout << s <<endl;
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'cout'
   12 |   s[k] = s[k] - 0x20
      |                     ^
      |                     ;
   13 | 
   14 |    cout << s <<endl;
      |    ~~~~
Language: C++

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

main(){
  int k;
  char s[50];
  
  cin >> k;
  sprintf("%s",s);
  
  s[k] = s[k] - 0x20
    
   cout << s <<endl;
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   10 |   sprintf("%s",s);
      |           ^~~~
a.cc:12:21: error: expected ';' before 'cout'
   12 |   s[k] = s[k] - 0x20
      |                     ^
      |                     ;
   13 | 
   14 |    cout << s <<endl;
      |    ~~~~
Language: C++

#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;

int main()
{
  int n, k; cin >> n >> k;
  string s; cin >> s;
  s[k].toupper();
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: request for member 'toupper' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)k))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   10 |   s[k].toupper();
      |        ^~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
    4 |     char S[50];
      |     ^~~~
main.c:5:24: error: 'K' undeclared (first use in this function)
    5 |     scanf("%d%d", &N, &K);
      |                        ^
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 'S' undeclared (first use in this function)
    6 |     scanf("%s", S);
      |                 ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'A' was not declared in this scope
   10 |   if(S.at(K)==A){
      |               ^
a.cc:11:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |     S.at(K)="a";
      |             ^~~
      |             |
      |             const char*
a.cc:13:21: error: 'B' was not declared in this scope
   13 |   else if( S.at(K)==B){
      |                     ^
a.cc:14:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   14 |     S.at(K)="b";
      |             ^~~
      |             |
      |             const char*
a.cc:16:20: error: 'C' was not declared in this scope
   16 |   else if(S.at(K)==C){
      |                    ^
a.cc:17:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   17 |     S.at(K)="c";
      |             ^~~
      |             |
      |             const char*
Language: C++

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

int main() {
  int n, k;
  cin >> n >> k;
  
  string s;
  cin >> s;
  
  s.at(k-1) = transform(s.at(k-1));
  
  cout << s << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: no matching function for call to 'transform(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   12 |   s.at(k-1) = transform(s.at(k-1));
      |               ~~~~~~~~~^~~~~~~~~~~
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
Language: C++

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

int main() {
  int n, k;
  cin >> n >> k;
  
  string s;
  cin >> s;
  
  s.at(k-1) = transform(s.at(k-1));
  
  cout << s << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: no matching function for call to 'transform(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   11 |   s.at(k-1) = transform(s.at(k-1));
      |               ~~~~~~~~~^~~~~~~~~~~
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
Language: Java

import java.util.Scanner;

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.nextLine();
    
    String newS = s.replace(s[k],toLowerCase(s[k]));
    System.out.println(newS);
  }
}

Compiler output:
Main.java:10: error: array required, but String found
    String newS = s.replace(s[k],toLowerCase(s[k]));
                             ^
Main.java:10: error: array required, but String found
    String newS = s.replace(s[k],toLowerCase(s[k]));
                                              ^
2 errors
Language: Java

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[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    str[i] = "a";
                } else if (str[i].equals("B")){
                    str[i] = "b";
                } else {
                    str[i] = "c";
                }
                str[i] = "a";
            }
            System.out.print(str[i]);
        }
        sc.close();
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new  Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new  Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

/*@author hussein zayed ;
    ___  ___
   |\  \|\  \
   \ \  \_\  \
    \ \   ___ \USSEIN
     \ \  \\ \ \
      \ \__\\ \_\
       \|__| \|__|
****************************************
*/
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <vector>
#include <utility>
#include <map>
#include <deque>
#include <math.h>
#include <cstring>
#include <string.h>
#include <stdlib.h>
#include <queue>
#include <stack>
#include <list>//
#include <regex> // gcd;
#include <bits/stdc++.h>
using namespace std;
#define fr for(int i=0;i<n;++i)
#define fr1 for(int i=1;i<=n;++i)
#define cinA for(int i=0;i<n;++i){cin>>arr[i];}
#define cinA1 for(int i=1;i<=n;++i){cin>>arr[i];}
#define coutA for(int i=0;i<n;++i){cout<<arr[i]<<" ";}
#define ll long long
#define lnarray sizeof(arr)/sizeof(*arr)
#define vi vector<int>
#define vs vector<string>
void Fast()
{
    ios_base :: sync_with_stdio( 0 ) ;
    cin.tie( 0 ) ;
    cout.tie( 0 ) ;
}
inline int RD()
{
    int i ;
    cin>>i;
    return i;
}

inline float RF()
{
    float i ;
    cin>>i;
    return i;
}

inline double RDO()
{
    double i ;
    cin>>i;
    return i;
}

inline string RS()
{
    string i ;
    cin>>i;
    return i;
}

inline ll RLL()
{
    ll i ;
    cin>>i;
    return i;
}

int cm[200000];

ll sumSet(int n)
{
    return (1ll*n*(n+1))/2;
}
string s;

inline ll fact(int n)
{
    ll sum=1;
    for(int i=1; i<=n; ++i)
    {
        sum*=i;
    }
    return sum;
}
ll permtution(string s)
{
    ll tot=1;
    int arr[26]= {};
    for(int i=0; i<s.size(); ++i)
    {
        arr[s[i]-'a']++;
    }
    for(int i=0; i<26; ++i)
    {
        if(arr[i]>1)
            tot*=fact(arr[i]);
    }
    int sz=s.size();
    ll per =fact(sz);
    ll ans=per/tot;
    return ans;
}

bool isPrime(int n)
{
    if(n==1)
        return false;
    for(int i=2; i*i<=n; ++i)
    {
        if(n%i==0)
            return false;
    }
    return true;
}
int sumDigit(int n){
int sum =0;
  while (n != 0)
    {
        sum+= + n % 10;
        n = n / 10;
    }
    return sum;
}

ll power2(int n){
  ll ans=(1<<n);
  return ans;
}
int main(){
    Fast();
//freopen("output.txt" , "w" , stdout);
//freopen("wall.in" , "r" , stdin);

int n=RD(),pos=RD();
string s=RS();
s[pos-1]=tolower(s[pos-1]);
cout<<s<<"\n;

}
/*
int n=RD(),m=RD(),mn=0,mx=0,arr[m+2],k=0,nc=n,arr1[m+3],l=m;
ll sum=0;
  for(int i=0;i<m;++i){
   cin>>arr[i];

  }
  for(int i=1;i<=m;++i){

   arr1[i]=arr[i-1];
  }
 sort(arr,arr+m);
 sort(arr1+1,arr1+1);
   while(nc>0){
    mn+=arr[k],arr[k]--,nc--;
    if(arr[k]==0)
    k++;
   }

   while(n>0){
    mx+=arr1[l],arr[l]--,n--;

    if(arr[l]<arr[l-1])
     l=l-1;
     if(l==0)
      l=m;
   }
   cout<<mx<<" "<<mn;
   */



Compiler output:
a.cc:149:10: warning: missing terminating " character
  149 | cout<<s<<"\n;
      |          ^
a.cc:149:10: error: missing terminating " character
  149 | cout<<s<<"\n;
      |          ^~~~
a.cc: In function 'int main()':
a.cc:151:1: error: expected primary-expression before '}' token
  151 | }
      | ^
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
}


Compiler output:
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main(){
  int x,y;
    cahr s[x];
  cin>>x>>y>>s;
  if (s.at(y)=="A"){
    s.at(y)="a";}
if(s.at(y)=="B"){
s.at(y)="b";}
if(s.at(y)=="C"){
s.at(y)="c"}
cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cahr' was not declared in this scope; did you mean 'char'?
    5 |     cahr s[x];
      |     ^~~~
      |     char
a.cc:6:14: error: 's' was not declared in this scope
    6 |   cin>>x>>y>>s;
      |              ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main(){
  int x,y;
  string A,B,C;
    cahr s[x];
  cin>>x>>y>>s;
  if (s.at(y)==A){
    s.at(y)=a;}
if(s.at(y)==B){
s.at(y)=b;}
if(s.at(y)==C){
s.at(y)=c}
cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cahr' was not declared in this scope; did you mean 'char'?
    6 |     cahr s[x];
      |     ^~~~
      |     char
a.cc:7:14: error: 's' was not declared in this scope
    7 |   cin>>x>>y>>s;
      |              ^
a.cc:9:13: error: 'a' was not declared in this scope
    9 |     s.at(y)=a;}
      |             ^
a.cc:11:9: error: 'b' was not declared in this scope
   11 | s.at(y)=b;}
      |         ^
a.cc:13:9: error: 'c' was not declared in this scope
   13 | s.at(y)=c}
      |         ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main(){
  int x,y;
  string A,B,C;
    cahr s<x>;
  cin>>x>>y>>s;
  if (s.at(y)==A){
    s.at(y)=a;}
if(s.at(y)==B){
s.at(y)=b;}
if(s.at(y)==C){
s.at(y)=c}
cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cahr' was not declared in this scope; did you mean 'char'?
    6 |     cahr s<x>;
      |     ^~~~
      |     char
a.cc:7:14: error: 's' was not declared in this scope
    7 |   cin>>x>>y>>s;
      |              ^
a.cc:9:13: error: 'a' was not declared in this scope
    9 |     s.at(y)=a;}
      |             ^
a.cc:11:9: error: 'b' was not declared in this scope
   11 | s.at(y)=b;}
      |         ^
a.cc:13:9: error: 'c' was not declared in this scope
   13 | s.at(y)=c}
      |         ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main(){
  int x,y;
  string A,B,C;
    char s;
  cin>>x>>y;
  cin>>s;
  if (s.at(y)==A){
    s.at(y)=a;}
if(s.at(y)==B){
s.at(y)=b;}
if(s.at(y)==C){
s.at(y)=c}
cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: request for member 'at' in 's', which is of non-class type 'char'
    9 |   if (s.at(y)==A){
      |         ^~
a.cc:10:7: error: request for member 'at' in 's', which is of non-class type 'char'
   10 |     s.at(y)=a;}
      |       ^~
a.cc:10:13: error: 'a' was not declared in this scope
   10 |     s.at(y)=a;}
      |             ^
a.cc:11:6: error: request for member 'at' in 's', which is of non-class type 'char'
   11 | if(s.at(y)==B){
      |      ^~
a.cc:12:3: error: request for member 'at' in 's', which is of non-class type 'char'
   12 | s.at(y)=b;}
      |   ^~
a.cc:12:9: error: 'b' was not declared in this scope
   12 | s.at(y)=b;}
      |         ^
a.cc:13:6: error: request for member 'at' in 's', which is of non-class type 'char'
   13 | if(s.at(y)==C){
      |      ^~
a.cc:14:3: error: request for member 'at' in 's', which is of non-class type 'char'
   14 | s.at(y)=c}
      |   ^~
a.cc:14:9: error: 'c' was not declared in this scope
   14 | s.at(y)=c}
      |         ^
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-1) == "A"){
    S.at(K-1) = "a";
  }
  else if(S.at(K-1) == "B"){
    S.at(K-1) = "b";
  }
  else if(S.at(K-1) == "C"){
    S.at(K-1) = "c";
  }
  
  cout << S << endl;
  
}


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


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

    #include <bits/stdc++.h>
        #define rep1(i,n) for(int i=1;i<(int)(n);++i)

    #define rep(i,n) for(int i=0;i<(int)(n);++i)
    #define repone(i,n) for(int i=1;i<(int)(n);++i)

    #define Rep(i,n) for(int i=0;i<(int)(n);++i)

    #define int long long

    using namespace std;

    signed main()
    {
        string x;
        int n=0,m=0,i;
      	cin>>n>>m;
        cin>>x;
        (int)x[m]+=32;
        cout<<x<<endl;
        return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: lvalue required as left operand of assignment
   19 |         (int)x[m]+=32;
Language: C

#include<stdio.h>

int main(void){
  int N,K;
  char s[1000];
  
  scanf("%d %d",&N,&K);
  scanf("%s",s);
  
  if(s[K-1] == 'A'){
    s[K-1] = 'a';
  }
  elseif(s[K-1]=='B'){
    s[K-1]='b';
  }
  elseif(s[K-1]=='C'){
    s[K-1]='c';
  }
  
  printf("%s\n",s);
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   13 |   elseif(s[K-1]=='B'){
      |   ^~~~~~
main.c:13:22: error: expected ';' before '{' token
   13 |   elseif(s[K-1]=='B'){
      |                      ^
      |                      ;
Language: C

#include<stdio.h>

int main(void){
  char s[1000];
  
  int N , K;
  scanf("%d %d",&N,&K);
  scanf("%s",s);
  
  if(s[K-1]==A){
    s[K-1]=a;
  }
  elseif(s[K-1]==B){
    s[K-1]=b;
  }
  elseif(s[K-1]==C){
    s[K-1]=c;
  }
  
  printf("%s\n",s);
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:10:14: error: 'A' undeclared (first use in this function)
   10 |   if(s[K-1]==A){
      |              ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:12: error: 'a' undeclared (first use in this function)
   11 |     s[K-1]=a;
      |            ^
main.c:13:3: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   13 |   elseif(s[K-1]==B){
      |   ^~~~~~
main.c:13:18: error: 'B' undeclared (first use in this function)
   13 |   elseif(s[K-1]==B){
      |                  ^
main.c:13:20: error: expected ';' before '{' token
   13 |   elseif(s[K-1]==B){
      |                    ^
      |                    ;
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main() {
int N, K;
  cin >> N >> K;
  string name;
 
  cin >> name;
  
  if (name[K-1] == "A") {
	name[K-1] = "a";
  }else if (name[K-1] == "B") {
	name[K-1] = "n";
  }else if (name[K-1] == "C") {
    name[K-1] = "c";
  }
  cout << name << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if (name[K-1] == "A") {
a.cc:14:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   14 |         name[K-1] = "a";
      |                     ^~~
      |                     |
      |                     const char*
a.cc:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   }else if (name[K-1] == "B") {
a.cc:16:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |         name[K-1] = "n";
      |                     ^~~
      |                     |
      |                     const char*
a.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   }else if (name[K-1] == "C") {
a.cc:18:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   18 |     name[K-1] = "c";
      |                 ^~~
      |                 |
      |                 const char*
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 str = sc.next();
      String first = str.substring(0,k-1);
      String x = str.charAt(k-1);
      String last = str.substring(k,n);
      x = x.toLowerCase();
      System.out.println(first + x + last);
    }
}



Compiler output:
Main.java:9: error: incompatible types: char cannot be converted to String
      String x = str.charAt(k-1);
                           ^
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 str = sc.next();
      String first = str.substring(0,k-1);
      String x = str.charAt(k-1);
      String last = str.substring(k,n)
      x = x.toLowerCase();
      System.out.println(first + x + last);
    }
}



Compiler output:
Main.java:10: error: ';' expected
      String last = str.substring(k,n)
                                      ^
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 str = sc.next();
      String first = str.substring(0,k-1);
      Char x = str.charAt(k-1);
      String last = str.substring(k,n);
      x = x.toLowerCase();
      System.out.println(first + x + last);
    }
}



Compiler output:
Main.java:9: error: cannot find symbol
      Char x = str.charAt(k-1);
      ^
  symbol:   class Char
  location: class Main
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 str = sc.next();
      String first = str.substring(0,k-1);
      Char x = str.charAt(k-1);
      String last = str.substring(k,n)
      x = x.toLowerCase();
      System.out.println(first + x + last);
    }
}



Compiler output:
Main.java:10: error: ';' expected
      String last = str.substring(k,n)
                                      ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int a,b,c,d;
    a=s[0]-48;
    b=s[1]-48;
    c=s[2]-48;
    d=s[3]-49;
    int x,y;
    x=a*10 + b;
    y=c*10 + d;
    if(x<=12 && x>0 && y<=12 &&y>0)
    {
        cout<<"AMBIGUOUS"<<endl;
    }
    else if(x<=12 && x>0 &&y>12)
    {
        cout<<"MMYY"<<endl;
    }
    else if(x>12 && y<=12 &&y>0)
    {
        cout<<"YYMM"<<endl;
    }
    else
    {
        cout<<"NA"<<endl;
    }
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int a,b,c,d;
    a=s[0]-48;
    b=s[1]-48;
    c=s[2]-48;
    d=s[3]-48;
    int x,y;
    x=a*10 + b;

Compiler output:
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:45:16: error: expected '}' at end of input
   45 |     x=a*10 + b;
      |                ^
a.cc:36:1: note: to match this '{'
   36 | {
      | ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
        int flag1 = 0;int flag2 = 0;
        int n[] = new int[2];
        int d = 100;
      
     for (int i = 0; i < 2; i++) {n[i]=(S/d);S%=d;d/=100;}
     if(n[0]=>0){if(n[1]>00&&n[1]<13){flag1=1;}}
     if(n[0]>00&&n[0]<13){if(n[1]=>0){flag2=1;}}
      
     if(flag1==1&&flag2==1){System.out.print("AMBIGUOUS");}
     else if(flag1 == 1){System.out.print("YYMM");}
     else if(flag2 == 1){System.out.print("MMYY");}
     else {System.out.print("NA");}
      

	}
}


Compiler output:
Main.java:11: error: illegal start of expression
     if(n[0]=>0){if(n[1]>00&&n[1]<13){flag1=1;}}
             ^
Main.java:12: error: illegal start of expression
     if(n[0]>00&&n[0]<13){if(n[1]=>0){flag2=1;}}
                                  ^
2 errors
Language: C

#include<stdio.h>
 
int main(void){
int S,a,b;
scanf("%d",&num);
 
a = num/100;
b = num - a*100;
 
if(1<=a && a<=12)
{
  if(1<=b && b<=12)
  {
    printf("AMBIGUOUS");
  }
  else
  {
    printf("MMYY");
  }
}
else
{
  if(1<=b && b<=12)
  {
    printf("YYMM");
  }
  else
  {
    printf("NA");
  }
}
return(0);
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: 'num' undeclared (first use in this function)
    5 | scanf("%d",&num);
      |             ^~~
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


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

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

int main(){
	int N, K;
	cin >> N >> K;
	vector<char> S(N);
	for( int i = 0; i < N; i++ ){
		cin >> S.at(i);
	}
	
	for( int i = 0; i < N; i++ ){
		if( i = K - 1 ){
			if( S.at(i) == 'A' ){
				cout << 'a';
			}
			else if( S.at(i) == 'B' ){
				cout << 'b';
			}
			else{ cout << 'c'; }
		}
		else{ cout << S.at(i); }
	}
	cout << endl;
}

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

N, K = map(int, input().split())
S = input()
j = -1
ans = ''
for i in range(N):
    j += 1
    if (K-1) == j:
        ans += str.lower(S[i])
    else:
        ans += S[i]
print(ans)

Compiler output:
a.cc:4:7: error: empty character constant
    4 | ans = ''
      |       ^~
a.cc:1:1: error: 'N' does not name a type
    1 | N, K = map(int, input().split())
      | ^
Language: C++

#include <iostream>
using namespace std; 
int main() {
  int n, k; 
  string s;
  cin >> n >> k >> s;
  for ( int i =0; i < n; i++) {
    if (i==k) {
      if (s.at(k)==A) cout << "a";
      if (s.at(k)==B) cout << "b";
      if (s.at(k)==C) cout << "c";
    }
  else  cout << s.at(k);
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'A' was not declared in this scope
    9 |       if (s.at(k)==A) cout << "a";
      |                    ^
a.cc:10:20: error: 'B' was not declared in this scope
   10 |       if (s.at(k)==B) cout << "b";
      |                    ^
a.cc:11:20: error: 'C' was not declared in this scope
   11 |       if (s.at(k)==C) cout << "c";
      |                    ^
Language: C++

#include <iostream>
using namespace std; 
int main() {
  int n, k; 
  string s;
  cin >> n >> k >> s;
  for ( int i =0; i < n; i++) {
    if (i==k) {
      if (s.at(k)=="A") cout << "a";
      if (s.at(k)=="B") cout << "b";
      if (s.at(k)=="C") cout << "c";
    }
  else  cout << s.at(k);
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if (s.at(k)=="A") cout << "a";
      |           ~~~~~~~^~~~~
a.cc:10:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if (s.at(k)=="B") cout << "b";
      |           ~~~~~~~^~~~~
a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if (s.at(k)=="C") cout << "c";
      |           ~~~~~~~^~~~~
Language: C++

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

int main() {
  int N, K; cin >> N >> K;
  string S; cin >> string ;
  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:6:27: error: expected primary-expression before ';' token
    6 |   string S; cin >> string ;
      |                           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected primary-expression before ',' token
   11 |   cout << s <, endl;
      |              ^
Language: C++

#include <iostream>
#include <stdio.h>

int main() {
	int N;
	int K;
	char str[50];
	scanf_s("%d", &N);
	scanf_s("%d", &K);
	for (int i = 0; i <= N; i++) {
		scanf_s("%c", &str[i]);
	}
	str[K] = tolower(str[K]);

	for (int i = 0; i <= N; i++) {
		printf("%c\n", str[i]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

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

#define watch(x) cerr << (#x) << ": " << (x) << endl
#define int long long



int32_t main() {

    int n, k; cin >> n >> k;
    string s; cin >> s;

    s[k-1] -= 'A' - 'a';

    cout << s << endl;y
    
    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:16:23: error: 'y' was not declared in this scope
   16 |     cout << s << endl;y
      |                       ^
Language: C++

#include <iostream>
#include <stdio.h>

int main() {
	int N;
	int K;
	char str[50];
	scanf_s("%d", &N);
	scanf_s("%d", &K);
	scanf_s("%s", str);
	str[K] = str[K] + 32;
	printf("%s\n", str);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include "pch.h"
#include <iostream>
#include <stdio.h>

int main() {
	int N;
	int K;
	char str[50];
	scanf_s("%d", &N);
	scanf_s("%d", &K);
	scanf_s("%s", str);
	str[K] = str[K] + 32;
	printf("%s\n", str);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main(){
   int N,K;
   cin>>N>>K;
   string S;
   cin>>S;
   K=K-1;
   if(S[K]=='A'){
   S[K]='a';
   }
   else if(S[K]=='B'){
       S[K]='b';
   }
   else if(S[K]=='C'){
       S[K]='c';
   }
   cout<<S<<endl;
   

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected '}' at end of input
   19 |    cout<<S<<endl;
      |                  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

  S[k - 1] = S[k - 1] - 'A' + 'a';

  cout << S << endl;
}

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

#include<stdio.h>

int main(){
	char s[50];
	int n,k;
	int x;
	
	scanf("%d" "%d",&n,&k);	
	scanf("%s",&s[50]);
	if(si[k]=='A'){
	si[k]='a';
 	 }else if(si[k]=='B'){
	si[k]='b';
 	 }else if(si[k]=='C'){
	si[k]='c';
 	 }
	for(x=0;x<n;x++){
	printf("%c",si[x]);
    }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: 'si' undeclared (first use in this function); did you mean 's'?
   10 |         if(si[k]=='A'){
      |            ^~
      |            s
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main()
{ int n, l;
 scanf("%d %d",&n,&l) ;
 char array[n+n];
 scanf("%s",array);
 array[l-1] = array[l-1] - 26;
 puts(array)
 
  

Compiler output:
main.c: In function 'main':
main.c:9:13: error: expected ';' at end of input
    9 |  puts(array)
      |             ^
      |             ;
......
main.c:9:2: error: expected declaration or statement at end of input
    9 |  puts(array)
      |  ^~~~
Language: C

#include <stdio.h>

int main()
{ int n, l;
 scanf("%d %d") ;
 char array[n+n];
 scanf("%s",array);
 array[l-1] = array[l-1] - 26;
 puts(array)

  

Compiler output:
main.c: In function 'main':
main.c:9:13: error: expected ';' at end of input
    9 |  puts(array)
      |             ^
      |             ;
......
main.c:9:2: error: expected declaration or statement at end of input
    9 |  puts(array)
      |  ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int k,n,a[100010];
string s,ans;
int main() 
{
  cin>>n>>k>>s;
  for(int i=0;i<=k;i++)
  {
    ans=a[k]-'0';
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:4:1: error: 'string' does not name a type
    4 | string s,ans;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>n>>k>>s;
      |   ^~~
a.cc:7:14: error: 's' was not declared in this scope
    7 |   cin>>n>>k>>s;
      |              ^
a.cc:10:5: error: 'ans' was not declared in this scope
   10 |     ans=a[k]-'0';
      |     ^~~
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout<<ans;
      |   ^~~~
a.cc:12:9: error: 'ans' was not declared in this scope
   12 |   cout<<ans;
      |         ^~~