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

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


Compiler output:
a.cc:8:13: error: extended character ‘ is not valid in an identifier
    8 | if(s.at(K)==‘A’){
      |             ^
a.cc:8:13: error: extended character ’ is not valid in an identifier
a.cc:9:6: error: extended character ‘ is not valid in an identifier
    9 | s[K]=‘a’
      |      ^
a.cc:9:6: error: extended character ’ is not valid in an identifier
a.cc:11:18: error: extended character ‘ is not valid in an identifier
   11 | else if(s.at(K)==‘B’){
      |                  ^
a.cc:11:18: error: extended character ’ is not valid in an identifier
a.cc:12:6: error: extended character ‘ is not valid in an identifier
   12 | s[K]=‘b’
      |      ^
a.cc:12:6: error: extended character ’ is not valid in an identifier
a.cc:14:18: error: extended character ‘ is not valid in an identifier
   14 | else if(s.at(K)==‘C’){
      |                  ^
a.cc:14:18: error: extended character ’ is not valid in an identifier
a.cc:15:6: error: extended character ‘ is not valid in an identifier
   15 | s[K]=‘c’
      |      ^
a.cc:15:6: error: extended character ’ is not valid in an identifier
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >> N>>K;
      | ^~~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>s;
      | ^~~
a.cc: In function 'int main()':
a.cc:8:13: error: '\U00002018A\U00002019' was not declared in this scope
    8 | if(s.at(K)==‘A’){
      |             ^~~
a.cc:9:6: error: '\U00002018a\U00002019' was not declared in this scope
    9 | s[K]=‘a’
      |      ^~~
a.cc:11:18: error: '\U00002018B\U00002019' was not declared in this scope
   11 | else if(s.at(K)==‘B’){
      |                  ^~~
a.cc:12:6: error: '\U00002018b\U00002019' was not declared in this scope
   12 | s[K]=‘b’
      |      ^~~
a.cc:14:18: error: '\U00002018C\U00002019' was not declared in this scope
   14 | else if(s.at(K)==‘C’){
      |                  ^~~
a.cc:15:6: error: '\U00002018c\U00002019' was not declared in this scope
   15 | s[K]=‘c’
      |      ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,k,i;
  cin>>n>>k
  char a[n];
  for(i=0;i<n;i++)
  {
    cin>>a[i];
  }
  for(i=0;i<n;i++)
  {
    if(i+1==k)
    {
      a[i]+=32;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'char'
    6 |   cin>>n>>k
      |            ^
      |            ;
    7 |   char a[n];
      |   ~~~~      
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a[i];
      |          ^
a.cc:16:7: error: 'a' was not declared in this scope
   16 |       a[i]+=32;
      |       ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

std::cout << std::setprecision(10);

int main(void){
  unsigned int n, k;
  unsigned long long int max_, min_;
  cin >> n >> k;
  min_ = ceil(log2(k / n));
  max_ = ceil(log2(k));
  // cout << (pow(0.5L, min_ - 1LL) - pow(0.5L, max_)) / (long double)n << '\n';
  cout << (pow(2.0, max_ - min_ + 1) - 1) / (3 * pow(2.0, max_)) << '\n';
  return 0;
}

Compiler output:
a.cc:6:6: error: 'cout' in namespace 'std' does not name a type
    6 | std::cout << std::setprecision(10);
      |      ^~~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(void){
    int N, K;
    std::string moji[N];
    cin >> N >> K;
    for(int i = 0; i < N; i++)
        cin >> moji[i];
   
   for(int i = 0; i < N; i++){
       if(i == K-1)
          std::cout << std::tolower(moji[i]);
    std::cout << moji[i];
   }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: no matching function for call to 'tolower(std::string&)'
   15 |           std::cout << std::tolower(moji[i]);
      |                        ~~~~~~~~~~~~^~~~~~~~~
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::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>

using namespace std;

int main() {
	double n; cin >> n;
	int k; cin >> k;

	double p = 0;
	
	

	for (int i = 1; i <= n; i++) {
		double pb = 1 / n;

		for (int j = 1;i*(pow(2,j))<k; j++) {
			
			pb = pb * 0.5;
			
		}
		p = p + pb*0.5;
	
	}
	cout <<setprecision(12)<< p;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: 'pow' was not declared in this scope
   19 |                 for (int j = 1;i*(pow(2,j))<k; j++) {
      |                                   ^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    int a,b,c;
    cin >> a >> b >> c;
    int std;
    string K;
    if(3 == 1){
        cout << "aBC" << endl;
    }else if (4 == 3){
        cout << "CAbA" << endl;
        }
    }
    
}

Compiler output:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: Java

Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int K = sc.nextInt();
    String a = sc.next();
    String A = "A";
    String B = "B";
    String C = "C";
    if(a.charAt(K).equals(A)){
      a.replace(K,"a");
    }else if(a.charAt(K).equals(B)){
      a.replace(K,"b");
    }else if(a.charAt(K).equals(C)){
      a.replace(K,"c");
    }
    System.out.println(a);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
    if(a.charAt(K).equals(A)){
    ^
Main.java:10: error: class, interface, enum, or record expected
    }else if(a.charAt(K).equals(B)){
    ^
Main.java:12: error: class, interface, enum, or record expected
    }else if(a.charAt(K).equals(C)){
    ^
Main.java:14: error: class, interface, enum, or record expected
    }
    ^
5 errors
Language: C

#include "stdio.h"
 
int main(void){
  int N,K;
  scanf("%d %d",&N &K);
  
  char S[N];
 
  scanf("%s",S);
 
  K-=1;
 
  S[K]= S[K]+0x20;
  
  printf("%s", S);
}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: invalid operands to binary & (have 'int *' and 'int')
    5 |   scanf("%d %d",&N &K);
      |                 ~~ ^
      |                 |
      |                 int *
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
       Scanner scan = new Scanner(System.in);
　　　　int n = scan.nextInt();
　　　　int k = scan.nextInt();
			String s = scan.next();
			StringBuffer sb = new StringBuffer();
		
				for (int i = 0; i < s.length(); i++) {
					char temp = s.charAt(i);
					 if(i==k-1) {
						temp = (char)(temp+32);
					}
				sb.append(temp);
				}
			
			System.out.println(sb.toString());
    }
}


Compiler output:
Main.java:5: error: illegal character: '\u3000'
????int n = scan.nextInt();
^
Main.java:5: error: illegal character: '\u3000'
????int n = scan.nextInt();
 ^
Main.java:5: error: illegal character: '\u3000'
????int n = scan.nextInt();
  ^
Main.java:5: error: illegal character: '\u3000'
????int n = scan.nextInt();
   ^
Main.java:6: error: illegal character: '\u3000'
????int k = scan.nextInt();
^
Main.java:6: error: illegal character: '\u3000'
????int k = scan.nextInt();
 ^
Main.java:6: error: illegal character: '\u3000'
????int k = scan.nextInt();
  ^
Main.java:6: error: illegal character: '\u3000'
????int k = scan.nextInt();
   ^
8 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split();
        for(int i=0; i<num; i++){
          if(i == b) System.out.print(s[i].toLowerCase());
          else System.out.print(s[i]);
        }
	}
}

Compiler output:
Main.java:7: error: no suitable method found for split(no arguments)
        String[] s = sc.next().split();
                              ^
    method String.split(String,int) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(char,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.*;

public class sample{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n1 = Integer.parseInt(sc.next());
    int n2 = Integer.parseInt(sc.next());
    String s = sc.next();
    
    char s2 = s.charAt(n2-1);
    String s3 = String.valueOf(s2);

    String s0 = s.replace(s3, s3.toLowerCase());
    System.out.println(s0);

  }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
string abc;
int a,b;
  cin >> a >> b >> abc;
  abc.at(b-1)=abc.at(b-1)-(A-a);
  cout << abc << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: 'A' was not declared in this scope
    7 |   abc.at(b-1)=abc.at(b-1)-(A-a);
      |                            ^
Language: C++

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

int main(){
	int N,K;
	string S
	cin >> N >> K >> S;
	if(S[K-1]>=97 && S[K-1]<=122){
	        S[K-1] -= 32;
	}else{
		S[K-1]+=32;
	}
	cout << S << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'cin'
    8 |         cin >> N >> K >> S;
      |         ^~~
a.cc:9:12: error: 'S' was not declared in this scope
    9 |         if(S[K-1]>=97 && S[K-1]<=122){
      |            ^
a.cc:14:17: error: 'S' was not declared in this scope
   14 |         cout << S << "\n";
      |                 ^
Language: C++

N = int(input())
K = int(input())
S = str(input())

s_up = list(S)
s_low = s_up[K-1].lower()
s_up [K-1] = s_low

for n in range(N):
    print(s_up[n], end='')

print()


Compiler output:
a.cc:10:24: error: empty character constant
   10 |     print(s_up[n], end='')
      |                        ^~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C

#include <stdio.h>
int main(){
  int a,b = 0;
  scanf("%d",&a);
  scanf("%d",&b);
  char　c[a+1];
  for(int i=0;i<a;i++){
  scanf("%s",&c[i]);
  }
  c[b-1] = c[b-1] + 0x20;
  print("%s",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: stray '\343' in program
    6 |   char<U+3000>c[a+1];
      |       ^~~~~~~~
main.c:11:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |   print("%s",c);
      |   ^~~~~
      |   printf
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N,K; 
cin >> N>>K;
string s;
cin>>s;
int main() {
if(s.at(K-1)==‘A’){
s[K-1]=‘a’
}
else if(s.at(K-1)==‘B’){
s[K-1]=‘b’
}
else if(s.at(K-1)==‘C’){
s[K-1]=‘c’
}
cout<<s<<endl;
}

Compiler output:
a.cc:8:15: error: extended character ‘ is not valid in an identifier
    8 | if(s.at(K-1)==‘A’){
      |               ^
a.cc:8:15: error: extended character ’ is not valid in an identifier
a.cc:9:8: error: extended character ‘ is not valid in an identifier
    9 | s[K-1]=‘a’
      |        ^
a.cc:9:8: error: extended character ’ is not valid in an identifier
a.cc:11:20: error: extended character ‘ is not valid in an identifier
   11 | else if(s.at(K-1)==‘B’){
      |                    ^
a.cc:11:20: error: extended character ’ is not valid in an identifier
a.cc:12:8: error: extended character ‘ is not valid in an identifier
   12 | s[K-1]=‘b’
      |        ^
a.cc:12:8: error: extended character ’ is not valid in an identifier
a.cc:14:20: error: extended character ‘ is not valid in an identifier
   14 | else if(s.at(K-1)==‘C’){
      |                    ^
a.cc:14:20: error: extended character ’ is not valid in an identifier
a.cc:15:8: error: extended character ‘ is not valid in an identifier
   15 | s[K-1]=‘c’
      |        ^
a.cc:15:8: error: extended character ’ is not valid in an identifier
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >> N>>K;
      | ^~~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>s;
      | ^~~
a.cc: In function 'int main()':
a.cc:8:15: error: '\U00002018A\U00002019' was not declared in this scope
    8 | if(s.at(K-1)==‘A’){
      |               ^~~
a.cc:9:8: error: '\U00002018a\U00002019' was not declared in this scope
    9 | s[K-1]=‘a’
      |        ^~~
a.cc:11:20: error: '\U00002018B\U00002019' was not declared in this scope
   11 | else if(s.at(K-1)==‘B’){
      |                    ^~~
a.cc:12:8: error: '\U00002018b\U00002019' was not declared in this scope
   12 | s[K-1]=‘b’
      |        ^~~
a.cc:14:20: error: '\U00002018C\U00002019' was not declared in this scope
   14 | else if(s.at(K-1)==‘C’){
      |                    ^~~
a.cc:15:8: error: '\U00002018c\U00002019' was not declared in this scope
   15 | s[K-1]=‘c’
      |        ^~~
Language: C

#include <stdio.h>
int main(){
  int a,b = 0;
  scanf("%d",&a);
  scanf("%d",&b);
  char　c[a+1];
  for(int i=0;i<a;i++){
  scanf("%d",&c[i]);
  }
  c[b-1] = c[b-1] + 0x20;
  print("%s",c);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: stray '\343' in program
    6 |   char<U+3000>c[a+1];
      |       ^~~~~~~~
main.c:11:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |   print("%s",c);
      |   ^~~~~
      |   printf
Language: C

#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>

// using
using namespace std;

// typedef
typedef long long ll;
typedef unsigned long long ull;

// assert
template <typename T>
void assert_between(T val, T min, T max)
{
    assert(min <= val && val <= max);
}

// math
// 最大公約数(Gratest Common Divisor)を求める.
template <typename T>
T gcd(T a, T b)
{
    assert(a > 0 && b > 0);
    T num1 = max(a, b);
    T num2 = min(a, b);
    T mod = num1 % num2;
    return (mod == 0) ? num2 : gcd(num2, mod);
}

// 最小公倍数(Least Common Multiple)を求める.
template <typename T>
T lcm(T a, T b)
{
    return (a * b) / gcd(a, b);
}

int N = INT32_MAX;
int K = INT32_MAX;
string S = "";

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

    scanf("%d %d", &N, &K);
    cin >> S;
    assert(S.length() == N);

    switch (S[K-1])
    {
    case 'A':
        S[K-1] = 'a';
        break;
    case 'B':
        S[K-1] = 'b';
        break;
    case 'C':
        S[K-1] = 'c';
        break;
    default:
        assert(false);
        break;
    }

    printf("%s\n", S.c_str());
}



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

#include<iostream>
using namespace std;

int main(){
  
 string str; 
 int N,K;
  str = "ABC"
  cin>> N >> K;
  cin>> S;
  for (int i = 0; i < str.size(N); i++) {
    if( str.at(k)==A){
    str.at(k) = 'a';
}
       if( str.at(k)==B){
    str.at(k) = 'b';
}  
       if( str.at(k)==C){
    str.at(k) = 'c';
}  
      
    }
  
 
  cout << str << endl
                    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'cin'
    8 |   str = "ABC"
      |              ^
      |              ;
    9 |   cin>> N >> K;
      |   ~~~         
a.cc:10:9: error: 'S' was not declared in this scope
   10 |   cin>> S;
      |         ^
a.cc:11:31: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
   11 |   for (int i = 0; i < str.size(N); i++) {
      |                       ~~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:12:16: error: 'k' was not declared in this scope
   12 |     if( str.at(k)==A){
      |                ^
a.cc:12:20: error: 'A' was not declared in this scope
   12 |     if( str.at(k)==A){
      |                    ^
a.cc:15:19: error: 'k' was not declared in this scope
   15 |        if( str.at(k)==B){
      |                   ^
a.cc:15:23: error: 'B' was not declared in this scope
   15 |        if( str.at(k)==B){
      |                       ^
a.cc:18:19: error: 'k' was not declared in this scope
   18 |        if( str.at(k)==C){
      |                   ^
a.cc:18:23: error: 'C' was not declared in this scope
   18 |        if( str.at(k)==C){
      |                       ^
a.cc:25:22: error: expected ';' before '}' token
   25 |   cout << str << endl
      |                      ^
      |                      ;
   26 |                     }
      |                     ~
Language: C++

include <iostream>

using namespace std;

int main() {
    int a,b,c;
    cin >> a >> b >> c;
    if(3 == 1){
        cout << "aBC" << endl;
    }else{
        cout << "CAbA" << endl;
    }
    
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |     ^~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << "aBC" << endl;
      |         ^~~~
a.cc:9:26: error: 'endl' was not declared in this scope
    9 |         cout << "aBC" << endl;
      |                          ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << "CAbA" << endl;
      |         ^~~~
a.cc:11:27: error: 'endl' was not declared in this scope
   11 |         cout << "CAbA" << endl;
      |                           ^~~~
Language: C++

N, K = map(int, input().split(' '))
S = input()

if len(S) != N:
    print("error")

Ans = []
for i in range(N):
    if i == K-1:
        Ans.append(S[i].lower())
    else:
        Ans.append(S[i])
Ans_str = "".join(Ans)
print(Ans_str)


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split();
        for(int i=0; i<num; i++){
          if(i == b) System.out.print(s[i:.toLowerCase())
           else System.out.print(s[i])
        }
	}
}

Compiler output:
Main.java:9: error: ']' expected
          if(i == b) System.out.print(s[i:.toLowerCase())
                                         ^
Main.java:9: error: ';' expected
          if(i == b) System.out.print(s[i:.toLowerCase())
                                                        ^
Main.java:10: error: ';' expected
           else System.out.print(s[i])
                                      ^
Main.java:10: error: 'else' without 'if'
           else System.out.print(s[i])
           ^
4 errors
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<iostream>
using namespace std;
int main()
{
	char s[5];
	gets(s);
	int S[5],k;
	for (int i = 0; i < 4; i++)
	{
		k = (int)s[i] - 48;
		S[i] = k;
	}
	
	if (1 <= S[0] * 10 + S[1]&& S[0] * 10 + S[1] <= 12 && 1 <= S[2] * 10 + S[3])
		cout << "AMBIGUOUS";
	else if (1 <= S[0] * 10 + S[1] && S[0] * 10 + S[1] <= 12 && S[2] * 10 + S[3] > 12)
		cout << "MMYY";
	else if ((S[0] * 10 + S[1] > 12) &&  (S[2] * 10 + S[3]>=1) && (S[2] * 10 + S[3] <= 12))
		cout << "YYMM";
	else
		cout << "NA";
	return 0;
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N, K;cin>>N>>K;
  string S;cin>>S;
  if(S[K-1]=='A') S[K-1]='a';
  if(S[K-1]=='B') S[K-1]='b';
  if(S[K-1]=='C') S[K-1]='c';
  cout << S << endl;
  return 0;
}
include <bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc:13:1: error: 'include' does not name a type
   13 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:16:5: error: redefinition of 'int main()'
   16 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope
    5 |   int N, K;cin>>N>>K;
      |            ^~~
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S;cin>>S;
      |   ^~~~~~
a.cc:6:17: error: 'S' was not declared in this scope
    6 |   string S;cin>>S;
      |                 ^
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout << S << endl;
      |   ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope
   10 |   cout << S << endl;
      |                ^~~~
Language: C++

# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
n, k = map(int, input().split())

# 文字列の入力
s = list(input())
#対象箇所
a = s[k:k+1]
#文字列変換
a = ','.join(a)
#対象箇所を小文字に変換
a = a.lower()
#置換
s[k:k+1] = a

print(s)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:3:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b
    3 | # スペース区切りの整数の入力
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:3: error: invalid preprocessing directive #\U00006587\U00005b57\U00005217\U0000306e\U00005165\U0000529b
    6 | # 文字列の入力
      |   ^~~~~~~~~~~~
a.cc:8:2: error: invalid preprocessing directive #\U00005bfe\U00008c61\U00007b87\U00006240
    8 | #対象箇所
      |  ^~~~~~~~
a.cc:10:2: error: invalid preprocessing directive #\U00006587\U00005b57\U00005217\U00005909\U000063db
   10 | #文字列変換
      |  ^~~~~~~~~~
a.cc:12:2: error: invalid preprocessing directive #\U00005bfe\U00008c61\U00007b87\U00006240\U00003092\U00005c0f\U00006587\U00005b57\U0000306b\U00005909\U000063db
   12 | #対象箇所を小文字に変換
      |  ^~~~~~~~~~~~~~~~~~~~~~
a.cc:14:2: error: invalid preprocessing directive #\U00007f6e\U000063db
   14 | #置換
      |  ^~~~
a.cc:4:1: error: 'n' does not name a type
    4 | n, k = map(int, input().split())
      | ^
Language: C

include "stdio.h"

int main(void){
  int N,K;
  scanf("%d",&N);
  
  char S[N];

  scanf("%s",S);
  
  scanf("%d",&K);

  K-=1;

  S[K]= S[K]+0x20;
  
  printf("%s", S);
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
    1 | include "stdio.h"
      |         ^~~~~~~~~
Language: C++

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

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

  string S;
  cin >> S;

  transform(S.begin(K), S.end, S,begin, tolwer);
  //S.at(K) = tolwer;
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: no matching function for call to 'std::__cxx11::basic_string<char>::begin(int&)'
   11 |   transform(S.begin(K), S.end, S,begin, tolwer);
      |             ~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:960:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::begin() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator]'
  960 |       begin() _GLIBCXX_NOEXCEPT
      |       ^~~~~
/usr/include/c++/14/bits/basic_string.h:960:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:969:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::begin() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
  969 |       begin() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
/usr/include/c++/14/bits/basic_string.h:969:7: note:   candidate expects 0 arguments, 1 provided
a.cc:11:41: error: 'tolwer' was not declared in this scope; did you mean 'tolower'?
   11 |   transform(S.begin(K), S.end, S,begin, tolwer);
      |                                         ^~~~~~
      |                                         tolower
Language: C++

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

int main(){
  string S;
  cin >> S;
  
  string c01 = S[0]+S[1];
  string c23 = S[2]+S[3];
  
  int i01 = stoi(c01);
  int i23 = stoi(c23);
  
  if(i01 >= 1 && i01 <=12 && i23 >= 1 && i23 <=12) {
    cout << "AMBIGUOUS" << endl;
  }else if(i01 >= 0 && i23 >= 1 && i23 <=12) {
    cout << "YYMM" << endl;
  }else if( i01 >= 1 && i01 <=12 && i23 >= 0) {
    cout << "MMYY" << endl;
  }else{
    cout << "NA" << endl;
  }
  return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string c01 = S[0]+S[1];
a.cc:10:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   string c23 = S[2]+S[3];
Language: C++

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

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

  string S;
  cin >> S;

  S.at(K) = tolwer;
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'tolwer' was not declared in this scope; did you mean 'tolower'?
   11 |   S.at(K) = tolwer;
      |             ^~~~~~
      |             tolower
Language: Java

import java.util.Scanner;

public class quizA{
    
    public static void main(String[] args){
        Scanner stdle = new Scanner(System.in);
        int n = stdle.nextInt();
        int k = stdle.nextInt();
        String s = new String[n];
        quiz(n,k);
    }

        public static String quiz(int N, int K){
            for(int i = 0; i < N; i++){
                s[i] = stdle.next();
                if(i == K){
                    
                }
            }

            


        }

}

Compiler output:
Main.java:3: error: class quizA is public, should be declared in a file named quizA.java
public class quizA{
       ^
Main.java:9: error: incompatible types: String[] cannot be converted to String
        String s = new String[n];
                   ^
Main.java:15: error: cannot find symbol
                s[i] = stdle.next();
                ^
  symbol:   variable s
  location: class quizA
Main.java:15: error: cannot find symbol
                s[i] = stdle.next();
                       ^
  symbol:   variable stdle
  location: class quizA
4 errors
Language: C

#include<stdio.h>
int main(void){
  int N,k;
  char s[50];
  scanf("%d %d\n%c",&N,&k,s);
  switch(s[k-1]){
    case 'A':
      s[k-1]='a';
      break;
    case 'B';
      s[k-1]='b';
      break;
    case 'C';
      s[k-1]='b';
      break;
  }
  printf("%s",s);
  return 0;
}
  
    

Compiler output:
main.c: In function 'main':
main.c:10:13: error: expected ':' or '...' before ';' token
   10 |     case 'B';
      |             ^
main.c:13:13: error: expected ':' or '...' before ';' token
   13 |     case 'C';
      |             ^
Language: C++

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

int main()
{
  int N,K ;
  string S ;
  cin>>N>>K ;
  cin>>S ;
  
  switch(S[K-1]){
    case 'A': S[K-1]='a' ;
              break ;
    case 'B': S[K-1]='b' ;
              break ;
    case 'C': S[k-1]='c' ;
              break ;
  }
  
  cout<<S<<endl  ;
  
  return 0 ;
}


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

#include <stdio.h>
#include <conio.h>

int main(void)
{
	int n;
	int a;
	int k;
	char s[50];
	
	scanf("%d", &n);
	a = n;
	scanf("%d", &k);
	
	for(n > 0; n > 0; n--){
		s[n] = getch();
	}
	
	
	
	s[k] += 0x20;
	

	while (a != 0){
		printf("%c", s[a]);
		a--;
	}
	
	return (0);
}


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

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

int main()
{
  int N,K ;
  string S ;
  cin>>N>>K ;
  cin>>S ;
  
  switch(N[K-1]){
    case 'A': N[K-1]='a' ;
              break ;
    case 'B': N[K-1]='b' ;
              break ;
    case 'C': N[k-1]='c' ;
              break ;
  }
  
  cout<<S<<endl  ;
  
  return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid types 'int[int]' for array subscript
   12 |   switch(N[K-1]){
      |           ^
a.cc:13:16: error: invalid types 'int[int]' for array subscript
   13 |     case 'A': N[K-1]='a' ;
      |                ^
a.cc:15:16: error: invalid types 'int[int]' for array subscript
   15 |     case 'B': N[K-1]='b' ;
      |                ^
a.cc:17:17: error: 'k' was not declared in this scope
   17 |     case 'C': N[k-1]='c' ;
      |                 ^
Language: C++

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

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


Compiler output:
a.cc:2:9: fatal error: cstdio.h: No such file or directory
    2 | #include<cstdio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
  int N,k;
  char s[50];
  scanf("%d %d\n%c",&N,&k,s);
  switch(s[k-1]){
    case A:
      s[k-1]=a;
      break;
    case B;
      s[k-1]=b;
      break;
    case C;
      s[k-1]=b;
      break;
  }
  printf("%s",s);
  return 0;
}
  
    

Compiler output:
main.c: In function 'main':
main.c:7:10: error: 'A' undeclared (first use in this function)
    7 |     case A:
      |          ^
main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:14: error: 'a' undeclared (first use in this function)
    8 |       s[k-1]=a;
      |              ^
main.c:10:10: error: 'B' undeclared (first use in this function)
   10 |     case B;
      |          ^
main.c:10:11: error: expected ':' or '...' before ';' token
   10 |     case B;
      |           ^
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |       s[k-1]=b;
      |              ^
main.c:13:10: error: 'C' undeclared (first use in this function)
   13 |     case C;
      |          ^
main.c:13:11: error: expected ':' or '...' before ';' token
   13 |     case C;
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n>>k;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<s<<endl;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:12: error: 'endl' was not declared in this scope
    9 |   cout<<s<<endl;
      |            ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C

#include<stdio.h>
int main(void){
  int N,K;
  char s[];
  scanf("%d %d\n%c",&N,&K,s);
  switch(s[k-1]){
    case A:
      s[k-1]=a;
      break;
    case B;
      s[k-1]=b;
      break;
    case C;
      s[k-1]=b;
      break;
  }
  printf("%s",s);
  return 0;
}
  
    

Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 's'
    4 |   char s[];
      |        ^
main.c:6:12: error: 'k' undeclared (first use in this function)
    6 |   switch(s[k-1]){
      |            ^
main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: 'A' undeclared (first use in this function)
    7 |     case A:
      |          ^
main.c:8:14: error: 'a' undeclared (first use in this function)
    8 |       s[k-1]=a;
      |              ^
main.c:10:10: error: 'B' undeclared (first use in this function)
   10 |     case B;
      |          ^
main.c:10:11: error: expected ':' or '...' before ';' token
   10 |     case B;
      |           ^
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |       s[k-1]=b;
      |              ^
main.c:13:10: error: 'C' undeclared (first use in this function)
   13 |     case C;
      |          ^
main.c:13:11: error: expected ':' or '...' before ';' token
   13 |     case C;
      |           ^
Language: C++

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

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

Compiler output:
a.cc:2:9: fatal error: cstdio.h: No such file or directory
    2 | #include<cstdio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 's'
    4 |   char s[];
      |        ^
main.c:6:8: error: 'k' undeclared (first use in this function)
    6 |   if(s[k-1]=='A'){
      |        ^
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:10: error: 'A' undeclared (first use in this function)
   10 |     case A:
      |          ^
main.c:11:14: error: 'a' undeclared (first use in this function)
   11 |       s[k-1]=a;
      |              ^
main.c:13:10: error: 'B' undeclared (first use in this function)
   13 |     case B;
      |          ^
main.c:13:11: error: expected ':' or '...' before ';' token
   13 |     case B;
      |           ^
main.c:14:14: error: 'b' undeclared (first use in this function)
   14 |       s[k-1]=b;
      |              ^
main.c:16:10: error: 'C' undeclared (first use in this function)
   16 |     case C;
      |          ^
main.c:16:11: error: expected ':' or '...' before ';' token
   16 |     case C;
      |           ^
Language: C++

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

int main() {
  int n,k;
  string s;
  cin>>n>>k>>s;
  int c=s.at(k);
  printf("Input Charactor : ");
  scanf("%c", &c);
  printf(" --> %c\n", tolowr(c));
  char tolower(char c){
    return (c+0x20);
  }
  s.at(k)='c';
  cout<<s<<endl;
  
}








Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'tolowr' was not declared in this scope; did you mean 'tolower'?
   11 |   printf(" --> %c\n", tolowr(c));
      |                       ^~~~~~
      |                       tolower
a.cc:12:23: error: a function-definition is not allowed here before '{' token
   12 |   char tolower(char c){
      |                       ^
Language: C++

#include <stdio.h>

#define STR_SIZE 51U
#define OFFSET 32U

int main(void) {
    int k, n;
    int r;
    int i;
    char* s, s_out;
    char c_tmp;

    r = scanf("%d %d", &n, &k);
    r = scanf("%s", s);

    for(i = 0; i <= n; i++ )
    {
        if (i == k)
        {
            if (s[i] >= 'A' && s[i] <= 'C')
            {
                c_tmp = s[i] + OFFSET;
            }
            else
            {
                c_tmp = s[i];
            }
            s_out[i] = c_tmp;
        }
        else
        {
           s_out[i] = s[i];
        }
    }

    printf("%s\n", s_out);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:18: error: invalid types 'char[int]' for array subscript
   28 |             s_out[i] = c_tmp;
      |                  ^
a.cc:32:17: error: invalid types 'char[int]' for array subscript
   32 |            s_out[i] = s[i];
      |                 ^
Language: C++

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

int main() {
    char AA[50];
    int a,b;
    cin >> a >> b;
    for (int i=0; i<=a; i++){
        cin >> AA[i];
    }
    b = b-1
    AA[b] = towlower(AA[b]);
    for(int i= 0; i<=a; i++){
        cout << AA[i];
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before 'AA'
   11 |     b = b-1
      |            ^
      |            ;
   12 |     AA[b] = towlower(AA[b]);
      |     ~~
Language: C++

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

int main() {
  int n,k;
  string s;
  cin>>n>>k>>s;
  int c=s.at(k);
  char c;
  char tolower(char c){
    return (c+0x20);
  }
  s.at(k)='c';
  cout<<s<<endl;
  
}







Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: conflicting declaration 'char c'
    9 |   char c;
      |        ^
a.cc:8:7: note: previous declaration as 'int c'
    8 |   int c=s.at(k);
      |       ^
a.cc:10:23: error: a function-definition is not allowed here before '{' token
   10 |   char tolower(char c){
      |                       ^
Language: C++

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

using namespace std;

int main() {
	int n, k;
	cin >> n >> k;
	double ans = 0;
	bool f = true;
	long count = 0;
	for (int i = 1; i <= n; i++)
	{
		f = true;
		count = 0;
		while (f)
		{
			//cout << i * pow(2,count) << endl;;
			if ((i * pow(2, count)) >= k)
			{
				f = false;
				//cout << count << endl;
			}
			count++;
		}
		ans = ans + (1 / pow(2, count));
	}
	ans /= n;
	cout << ans*2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:34: error: 'pow' was not declared in this scope
   20 |                         if ((i * pow(2, count)) >= k)
      |                                  ^~~
a.cc:27:34: error: 'pow' was not declared in this scope
   27 |                 ans = ans + (1 / pow(2, count));
      |                                  ^~~
Language: C++

#include<stdio.h>
int main(void){
  int N,K,i;
  scanf("%d%d",&N,&K);
  char S[N];
  for(i==0;i<N;++i;){
    scanf("%s",&S);
  }
  switch(S[K]){
      case'A':
      S[K]='a';
      break;
      case'B':
      S[K]='b';
      break;
      case'B':
      S[K]='B';
      break;
  }
  printf("%s",S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ')' before ';' token
    6 |   for(i==0;i<N;++i;){
      |      ~            ^
      |                   )
a.cc:6:20: error: expected primary-expression before ')' token
    6 |   for(i==0;i<N;++i;){
      |                    ^
a.cc:16:7: error: duplicate case value
   16 |       case'B':
      |       ^~~~
a.cc:13:7: note: previously used here
   13 |       case'B':
      |       ^~~~
Language: C++

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

int main() {
    char AA[50];
    int a,b;
    cin >> a >> b;
    for (int i=0; i<=a; i++){
        cin >> AA[i];
    }
    AA[b] = wint_t towlower(wint_t AA[b]);
    for(int i= 0; i<=a; i++){
        cout << AA[i];
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected primary-expression before 'towlower'
   11 |     AA[b] = wint_t towlower(wint_t AA[b]);
      |                    ^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string S;
      |   ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>N>>K;
      |   ^~~
a.cc:5:8: error: 'S' was not declared in this scope
    5 |   cin>>S;
      |        ^
a.cc:6:42: error: 'tolower' was not declared in this scope
    6 |   transform(S.begin(K),S.end(),S.begin(),tolower);
      |                                          ^~~~~~~
a.cc:6:3: error: 'transform' was not declared in this scope
    6 |   transform(S.begin(K),S.end(),S.begin(),tolower);
      |   ^~~~~~~~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<S<<endl;
      |   ^~~~
a.cc:7:12: error: 'endl' was not declared in this scope
    7 |   cout<<S<<endl;
      |            ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cctype>

using namespace std;

int main() {
	int N, K;
	string S, A;
	cin >> N >> K >> S;
	K--;
	A = S[K];
	transform(A.begin(), A.end(), A.begin(), tolower);
	S.replace(K, 1, A);
	cout << S << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
   15 |         transform(A.begin(), A.end(), A.begin(), tolower);
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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:15:18: note:   couldn't deduce template parameter '_UnaryOperation'
   15 |         transform(A.begin(), A.end(), A.begin(), 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 <iostream> 
#include<vector>
using namespace std;
int N,K; cin >> N>>K;
vector<string>A(N-1)
int main() {
for (int i = 0; i < N; ++i) cin >> A[i];
if(A[K-1]==‘A’){A[K-1]=‘a’
}
else if(A[K-1]==‘A’){A[K-1]=‘b’
}
else if(A[K-1]==‘A’){A[K-1]=‘c’
}
cout<<A<<endl;
}



Compiler output:
a.cc:8:12: error: extended character ‘ is not valid in an identifier
    8 | if(A[K-1]==‘A’){A[K-1]=‘a’
      |            ^
a.cc:8:12: error: extended character ’ is not valid in an identifier
a.cc:8:24: error: extended character ‘ is not valid in an identifier
    8 | if(A[K-1]==‘A’){A[K-1]=‘a’
      |                        ^
a.cc:8:24: error: extended character ’ is not valid in an identifier
a.cc:10:17: error: extended character ‘ is not valid in an identifier
   10 | else if(A[K-1]==‘A’){A[K-1]=‘b’
      |                 ^
a.cc:10:17: error: extended character ’ is not valid in an identifier
a.cc:10:29: error: extended character ‘ is not valid in an identifier
   10 | else if(A[K-1]==‘A’){A[K-1]=‘b’
      |                             ^
a.cc:10:29: error: extended character ’ is not valid in an identifier
a.cc:12:17: error: extended character ‘ is not valid in an identifier
   12 | else if(A[K-1]==‘A’){A[K-1]=‘c’
      |                 ^
a.cc:12:17: error: extended character ’ is not valid in an identifier
a.cc:12:29: error: extended character ‘ is not valid in an identifier
   12 | else if(A[K-1]==‘A’){A[K-1]=‘c’
      |                             ^
a.cc:12:29: error: extended character ’ is not valid in an identifier
a.cc:4:10: error: 'cin' does not name a type
    4 | int N,K; cin >> N>>K;
      |          ^~~
a.cc:6:1: error: expected ',' or ';' before 'int'
    6 | int main() {
      | ^~~