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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int ordem( const void *a, const void *b){
    int x=*(int *)a;
    int y= *(int *)b;

    if (x>y){
        return 1;
    } else if (x<y){
        return -1;
    } else {
        return 0;
    }
}
int main()
{
    int n,s[11234];
    scanf("%d %s", &n, s);

    for(int i=0; i<= strlen(s);i++){
        if(90 - (s[i]+n)>0){
            s[i] = ( 65 + (90-(s[i] + n) ));
        }
         if((90 - (s[i]+n))<=0){
            s[i]= s[i]+n;
            }
    }
     qsort(s, strlen(s), sizeof(int),ordem);
      for(int j=0; j<= strlen(s);j++){
        print("%s", s[j]);
      }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:29: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   22 |     for(int i=0; i<= strlen(s);i++){
      |                             ^
      |                             |
      |                             int *
In file included from main.c:3:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:30:22: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   30 |      qsort(s, strlen(s), sizeof(int),ordem);
      |                      ^
      |                      |
      |                      int *
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:31:31: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   31 |       for(int j=0; j<= strlen(s);j++){
      |                               ^
      |                               |
      |                               int *
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:32:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   32 |         print("%s", s[j]);
      |         ^~~~~
      |         printf
Language: C++

#include <bits/stdc++.h>
int main(){
  int N;
  cin>>N;
  char buf[256], *p;
  scanf("%s", buf);
  for(p = buf; *p; p++) {
    *p += N;
  }
  printf("%s\n", buf);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include "bits/stdc++.h"
#define rep(i,n) for(ll i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX numeric_limits<long long>::max()
#define intMAX numeric_limits<int>::max()
#define d_5 100000
#define d9_7 1000000007
#define vll vector<vector<long long>>
#define vl vector<long long>
#define vi vector<int>
#define vii vector<vector<int>>
#define pb push_back
#define pf push_front
#define ld long double
#define ll long long

int main(void){
  ll a;
  string s;
  cin>>a>>s;
  ll ini='A'-0;
  rep(i,s.size.()-1){
  	s[i]=(s[i]-ini+a)%26+ini;
  }
  cout<<s;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: invalid use of member function '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]' (did you forget the '()' ?)
   23 |   rep(i,s.size.()-1){
      |         ~~^~~~
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(ll i = 0; i < n; i++)
      |                                    ^
Language: C++

#include <bits/stdc++.h>
int main(void){
  int N;
  cin>>N;
  char buf[256], *p;
  scanf("%s", buf);
  for(p = buf; *p; p++) {
    *p += N;
  }
  printf("%s\n", buf);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
char change(int zurasi,char a)
{
	int x;
	x = ((int)(unsigned char)a - 65
		+ zurasi) % 26;
	return (char)(x+65);
}

 int main()
{
	int zurasi;
	int i, j, k = 0;
	cin >> zurasi;
	string S;
	cin >> S;
	for (j = 0;j < size(S);j++)
	{
		S[j] = change(zurasi, S[j]);
	}
	cout << S << ;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: expected primary-expression before ';' token
   23 |         cout << S << ;
      |                      ^
Language: C

#include<stdio.h>
#include<string.h>

int main(void)
{
    int i,num,N,j;
    char S[1000];

    scanf_s("%d",&N);
    scanf_s("%s",S);

    num = strlen(S);

    for(i=0; i<num; i++)
    {
        S[i] += N;

        if(S[i] > 'Z')
        {
            j = S[i] - 'Z';
            S[i] = 'A' +j -1;
        }
    }

    printf("%s",S);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |     scanf_s("%d",&N);
      |     ^~~~~~~
      |     scanf
Language: C++

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

int main(){
    int n;
    string s;
    

    cin >>n >>s;
    char zetto = 'Z';

    for(int i =0; i<s.size();i++){
        if(s.at(i)+n<=zetto){
            s.at(i)=s.at(i)+n;
        }else{
            s.at(i) = s.at(i)+n-26;
        }
    }

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

#include<iostream>
#include<string>
using namespace std;
char change(int zurasi,char a)
{
	int x;
	x = ((int)(unsigned char)a - 65
		+ zurasi) % 26;
	return (char)(x+65);
}

 int main()
{
	int zurasi;
	int i, j, k = 0;
	cin >> zurasi;
	string S;
	cin >> S;
	for (j = 0;j < size(S);j++)
	{
		S[j] = change(zurasi, S[j]);
	}
	for (k = 0;k < size(S);k++)
	{
		cout << S[k] << endl;
	}
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,j;
  int i=0;
  string S;
  cin>>N;
  cin>>S;
  size_t size = S.length();
  for(i=0;i<size;i++){
    string SS=S.substr(i,1);
    for(j=0;j<N;j++){
      if(SS=="Z"){
        string SS="A";
        N-=1;
      }
      ++SS;
    }
    S.replace(i,1,SS);
  }
  cout<<S<<endl;
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: no match for 'operator++' (operand type is 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   17 |       ++SS;
      |       ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  string S;
  cin>>S;
  int s=s.size();
  vector<int> x(s);
  vector<char> a={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','R','S','T','U','V','W','X','Y','Z'};
  for(int i=0;i<s;i++){
     bool Q=false;
    for(int j=0;j<26;j++){
      if(s.at(i)==a[j]){
        x[i]=j;
        Q=true;
        break;
      }
    }
      if(Q==true)break;
    }
    for(int i=0;i<s;i++){
      s.at(i)=a[(x[i]+N)%26];
    }
    for(int i=0;i<s;i++){
      cout<<s.at(i);
    }
    cout<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: request for member 'size' in 's', which is of non-class type 'int'
    8 |   int s=s.size();
      |           ^~~~
a.cc:14:12: error: request for member 'at' in 's', which is of non-class type 'int'
   14 |       if(s.at(i)==a[j]){
      |            ^~
a.cc:23:9: error: request for member 'at' in 's', which is of non-class type 'int'
   23 |       s.at(i)=a[(x[i]+N)%26];
      |         ^~
a.cc:26:15: error: request for member 'at' in 's', which is of non-class type 'int'
   26 |       cout<<s.at(i);
      |               ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,j;
  int i=0;
  string S;
  cin>>N;
  cin>>S;
  size_t size = S.length();
  for(i=0;i<size;i++){
    string SS=S.substr(i,1);
    for(j=0;j<N;j++){
      if(SS=="Z"){
        string SS="A";
        N-=1;
      }
      char SSS=SS;
      SSS++;
      SS=SSS;
    }
    S.replace(i,1,SS);
  }
  cout<<S<<endl;
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
   17 |       char SSS=SS;
      |                ^~
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	int N, S;
	string N, S;
	for (int N = 0; S < string.length(); ++i) {
		char ch = string[i];
		char chl = std::tolower(ch);
		if ((int)chl < (int)'a' || (int)chl >(int)'z') {
			rot_text += ch;
			continue;
		}

		if ((int)chl + rot > (int)'z') {
			rot_text += (char)((int)ch + rot - 26);
		}
		else if ((int)chl + rot < (int)'a') {
			rot_text += (char)((int)ch + rot + 26);
		}
		else {
			rot_text += (char)((int)ch + rot);
		}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: conflicting declaration 'std::string N'
    5 |         string N, S;
      |                ^
a.cc:4:13: note: previous declaration as 'int N'
    4 |         int N, S;
      |             ^
a.cc:5:19: error: conflicting declaration 'std::string S'
    5 |         string N, S;
      |                   ^
a.cc:4:16: note: previous declaration as 'int S'
    4 |         int N, S;
      |                ^
a.cc:6:35: error: expected primary-expression before '.' token
    6 |         for (int N = 0; S < string.length(); ++i) {
      |                                   ^
a.cc:6:48: error: 'i' was not declared in this scope
    6 |         for (int N = 0; S < string.length(); ++i) {
      |                                                ^
a.cc:7:33: error: expected primary-expression before '[' token
    7 |                 char ch = string[i];
      |                                 ^
a.cc:10:25: error: 'rot_text' was not declared in this scope
   10 |                         rot_text += ch;
      |                         ^~~~~~~~
a.cc:14:32: error: 'rot' was not declared in this scope
   14 |                 if ((int)chl + rot > (int)'z') {
      |                                ^~~
a.cc:15:25: error: 'rot_text' was not declared in this scope
   15 |                         rot_text += (char)((int)ch + rot - 26);
      |                         ^~~~~~~~
a.cc:18:25: error: 'rot_text' was not declared in this scope
   18 |                         rot_text += (char)((int)ch + rot + 26);
      |                         ^~~~~~~~
a.cc:21:25: error: 'rot_text' was not declared in this scope
   21 |                         rot_text += (char)((int)ch + rot);
      |                         ^~~~~~~~
a.cc:22:18: error: expected '}' at end of input
   22 |                 }
      |                  ^
a.cc:6:51: note: to match this '{'
    6 |         for (int N = 0; S < string.length(); ++i) {
      |                                                   ^
a.cc:22:18: error: expected '}' at end of input
   22 |                 }
      |                  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  string S;
  cin>>S;
  int s=s.size();
  vector<int> x(s);
  vector<char> a={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','R','S','T','U','V','W','X','Y','Z'};
  for(int i=0;i<s;i++){
     bool Q=false;
    for(int j=0;j<26;j++){
      if(s[i]==a[j]){
        x[i]=j;
        Q=true;
        break;
      }
    }
      if(Q==true)break;
    }
    for(int i=0;i<s;i++){
      s[i]=a[(x[i]+N)%26];
    }
    for(int i=0;i<s;i++){
      cout<<s[i];
    }
    cout<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: request for member 'size' in 's', which is of non-class type 'int'
    8 |   int s=s.size();
      |           ^~~~
a.cc:14:11: error: invalid types 'int[int]' for array subscript
   14 |       if(s[i]==a[j]){
      |           ^
a.cc:23:8: error: invalid types 'int[int]' for array subscript
   23 |       s[i]=a[(x[i]+N)%26];
      |        ^
a.cc:26:14: error: invalid types 'int[int]' for array subscript
   26 |       cout<<s[i];
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,j;
  int i=0;
  string S;
  cin>>N;
  cin>>S;
  size_t size = S.length();
  for(i=0;i<size;i++){
    string SS=S.substr(i,1);
    for(j=0;j<N;j++){
      if(SS=="Z"){
        string SS="A";
        N-=1;
      }
      SS.c_str();
      SS++;
      string SS=SS;
    }
    S.replace(i,1,SS);
  }
  cout<<S<<endl;
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |       SS.c_str();
      |       ~~~~~~~~^~
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:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:18:9: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   18 |       SS++;
      |       ~~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,j;
  int i=0;
  string S;
  cin>>N;
  cin>>S;
  size_t size = S.length();
  for(i=0;i<size;i++){
    string SS=S.substr(i,1);
    for(j=0;j<N;j++){
      if(SS=="Z"){
        string SS="A";
        N-=1;
      }
      SS.c_str()
      SS++;
      string SS=SS;
    }
    S.replace(i,1,SS);
  }
  cout<<S<<endl;
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected ';' before 'SS'
   17 |       SS.c_str()
      |                 ^
      |                 ;
   18 |       SS++;
      |       ~~         
a.cc:17:15: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |       SS.c_str()
      |       ~~~~~~~~^~
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:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<iomanip>
#include<array>
#include<string>
#include<vector>
using namespace std;
typedef int q;
typedef double w;
int main()
{
	int x;
	cin>>x;
	string g;
	cin>>g;
	g[(x-1])+=x;
	cout<<g;
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected ')' before ']' token
   16 |         g[(x-1])+=x;
      |           ~   ^
      |               )
a.cc:16:20: error: expected ']' before ';' token
   16 |         g[(x-1])+=x;
      |                    ^
      |                    ]
a.cc:16:20: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
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:1265:7: note: declared here
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <map>

int main()
{
    int dict_size = 26;
    std::map<char, int> alphaToNum = {
        {'A', 0}, {'B', 1}, {'C', 2}, {'D', 3}, {'E', 4}, {'F', 5}, {'G', 6}, {'H', 7}, {'I', 8}, {'J', 9}, {'K', 10}, {'L', 11}, {'M', 12}, {'N', 13}, {'O', 14}, {'P', 15}, {'Q', 16}, {'R', 17}, {'S', 18}, {'T', 19}, {'U', 20}, {'V', 21}, {'W', 22}, {'X', 23}, {'Y', 24}, {'Z', 25}
    };
    std::map<int, char> numToAlpha = {
        {0, 'A'}, {1, 'B'}, {2, 'C'}, {3, 'D'}, {4, 'E'}, {5, 'F'}, {6, 'G'}, {7, 'H'}, {8, 'I'}, {9, 'J'}, {10, 'K'}, {11, 'L'}, {12, 'M'}, {13, 'N'}, {14, 'O'}, {15, 'P'}, {16, 'Q'}, {17, 'R'}, {18, 'S'}, {19, 'T'}, {20, 'U'}, {21, 'V'}, {22, 'W'}, {23, 'X'}, {24, 'Y'}, {25, 'Z'}
    };
    int num;
    std::string inputs;
    std::cin >> num;
    std::cin >> inputs;
    
    std::string outputs;
    int i;
    for (i = 0; i < inputs.length(); ++i)
    {
        k = alphaToNum[inputs[i]] + num;
        k %= 26;
        outputs.push_back(numToAlpha[k]);
    }
    std::cout << outputs;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'k' was not declared in this scope
   23 |         k = alphaToNum[inputs[i]] + num;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,j;
  int i=0;
  string S;
  cin>>N;
  cin>>S;
  size_t size = S.length();
  for(i=0;i<size;i++){
    string SS=S.substr(i,1);
    for(j=0;j<N;j++){
      if(SS=="Z"){
        string SS="A";
        N-=1;
      }
      SS++;
    }
    S.replace(i,1,SS);
  }
  cout<<S<<endl;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   17 |       SS++;
      |       ~~^~
Language: C++

	for (int i=0;i<s.length();i++) {
		result+=char(int(s[i])+ n- 65) % 26 + 65;
	}
	cout<<result<<endl;
}

Compiler output:
a.cc:1:9: error: expected unqualified-id before 'for'
    1 |         for (int i=0;i<s.length();i++) {
      |         ^~~
a.cc:1:22: error: 'i' does not name a type
    1 |         for (int i=0;i<s.length();i++) {
      |                      ^
a.cc:1:35: error: 'i' does not name a type
    1 |         for (int i=0;i<s.length();i++) {
      |                                   ^
a.cc:4:9: error: 'cout' does not name a type
    4 |         cout<<result<<endl;
      |         ^~~~
a.cc:5:1: error: expected declaration before '}' token
    5 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<iomanip>
#include<array>
#include<string>
#include<vector>
using namespace std;
typedef int q;
typedef double w;
int main()
{
	int x;
	cin>>x
	string g;
	cin>>g;
	g.at(x)+=x;
	cout<<g;
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected ';' before 'string'
   13 |         cin>>x
      |               ^
      |               ;
   14 |         string g;
      |         ~~~~~~ 
a.cc:15:14: error: 'g' was not declared in this scope
   15 |         cin>>g;
      |              ^
Language: C++

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

int main(){
    int n;
    std::cin >> n;
    std::string s;
    std::cin >> s;
    std::string ans;
    
    char alfa[26]={
    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
    };
    
    for(int i=0;i<s.size();i++){
        char c=s[i];
        for(int j=0;j<26;j++){
            if(c==alfa[j]){
                int num=(j+n)%26;
                s.replace(i,1,1,alfa[num]);
                break;
            }
        }
    }
    std::cout << s << std::endl;
    return 0;
}#include <iostream>
#include <string>
#include <algorithm>

int main(){
    int n;
    std::cin >> n;
    std::string s;
    std::cin >> s;
    std::string ans;
    
    char alfa[26]={
    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
    };
    
    for(int i=0;i<s.size();i++){
        char c=s[i];
        for(int j=0;j<26;j++){
            if(c==alfa[j]){
                int num=(j+n)%26;
                s.replace(i,1,1,alfa[num]);
                break;
            }
        }
    }
    std::cout << s << std::endl;
    return 0;
}

Compiler output:
a.cc:28:2: error: stray '#' in program
   28 | }#include <iostream>
      |  ^
a.cc:28:3: error: 'include' does not name a type
   28 | }#include <iostream>
      |   ^~~~~~~
Language: C++

#include<functional>
#include<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdlib>
#include<utility>
#include<string>
#include<cstdio>
#include<vector>
#include<bitset>
#include<cmath>
#include<ctime>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
using namespace std;
const int inf=2147483647,dx[]={-1,0,1,0},dy[]={0,-1,0,1};// 上 左 下 右
const int N=100005,M=1000005,K=200005,mod=1000000007;
const long long llinf=9223372036854775807ll;
//int & long long
int n;
string s;
int main(){
	cin>>s;
	for(int i=0;i<s.size();i++)
	{
		int num=s-'a';
		num=(num+n)%26;
		cout<<num+'a';
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:26: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   30 |                 int num=s-'a';
      |                         ~^~~~
      |                         | |
      |                         | char
      |                         std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/bits/hashtable_policy.h:36,
                 from /usr/include/c++/14/bits/hashtable.h:35,
                 from /usr/include/c++/14/bits/unordered_map.h:33,
                 from /usr/include/c++/14/unordered_map:41,
                 from /usr/include/c++/14/functional:63,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:30:27: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   30 |                 int num=s-'a';
      |                           ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:30:27: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   30 |                 int num=s-'a';
      |                           ^~~
Language: C++

n = gets.to_i
s = gets.chomp

ar = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

ans = ""

t = s.length

t.times do |i|
	j = ar.index(s[i]).to_i
	a = ar[j+n].to_s
	ans = ans + a
end

puts ans

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C++


 #include<bits/stdc++.h>
using namespace std;
int main()
{
  int k;
  string newS;
  cin>>k>>newS;
  int l=newS.size();
 for(int i=0; i<l; ++i) 
    { 
        // ASCII value 
        int val = int(newS[i]);
  
        // if k-th ahead character exceed 'z' 
        if(val + k > 122){ 
            cout<<char(val+k-122); 
        } 
        else
            cout<<char(newS[i]+k); 
  
        k = dup; 
    } 
  cout<<newS;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: invalid conversion from 'int (*)(int) noexcept' to 'int' [-fpermissive]
   22 |         k = dup;
      |             ^~~
      |             |
      |             int (*)(int) noexcept
Language: Java

import java.util.*;

public class Main {
  static final String ascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int index = sc.nextInt();
    String str = sc.next();
    
    if (index == 0){
      System.out.println(str);  
    }else {
    
      String replaced = "";
      for (int i = 0 ; i < str.length() ; i++){
        char c = s.charAt(i);
        int si = ascii.indexOf(c);
        int ri = si + index;
        if(ri >= ascii.length()){
          ri = ri - ascii.length();
        }
        replaced = replaced + ascii.indexOf(ri);
      }
      System.out.println(replaced);
    }
  }
}

Compiler output:
Main.java:16: error: cannot find symbol
        char c = s.charAt(i);
                 ^
  symbol:   variable s
  location: class Main
1 error
Language: C++


 #include<bits/stdc++.h>
using namespace std;
int main()
{
  int k;
  string newS;
  cin>>k>>newS;
  int l=newS.size();
 for(int i=0; i<l; ++i) 
    { 
        // ASCII value 
        int val = int(s[i]); 
  
        // store the duplicate 
        int dup = k; 
  
        // if k-th ahead character exceed 'z' 
        if(val + k > 122){ 
            k -= (122-val); 
            k = k % 26; 
            newS += char(96 + k); 
        } 
        else
            newS += char(val + k); 
  
        k = dup; 
    } 
  cout<<newS;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 's' was not declared in this scope
   13 |         int val = int(s[i]);
      |                       ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		// 文字列の入力
		String s = sc.next();
		String org = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String con;
		String t = "";
		if ( n == 0 || n == 26 ) {
			con = org;
		} else {
			con = org.substring(n);
			con.concat(org.substring(0,n));
		}
		// 
		for ( int i = 0 ; i < s.length() ; i++ ) {
			String c = s.charAt(i);
			int ps = org.indexOf(c);
			t.concat(con.charAt(ps));
		}
		// 出力
		System.out.println(t);
	}
}



Compiler output:
Main.java:20: error: incompatible types: char cannot be converted to String
			String c = s.charAt(i);
			                   ^
Main.java:22: error: incompatible types: char cannot be converted to String
			t.concat(con.charAt(ps));
			                   ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C++

//的場梨沙★担当
//結城晴★副担当
//日野茜★副担当
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string.h>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
size_t strlen(const char S);
using namespace std;

int main() {
    string S,M;
    cin>>S;
    int N;
    cin>>N;
    int len;
    len=strlen(S);

    char c;
    for(c='A';c<='Z';c++){
        for(int i=0;i>len;i++){
            for(int t=0;t>26;t++){
                if(S[i]==c[t]){
                    while(c[t+N]>26){
                        c[t+N]=c[t+N]-26;
                    }
                    M=M+c[t+N];

                }

                }
            }
    }

    cout<<M<<endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:15: error: no matching function for call to 'strlen(std::string&)'
   49 |     len=strlen(S);
      |         ~~~~~~^~~
In file included from a.cc:23:
/usr/include/string.h:407:15: note: candidate: 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
/usr/include/string.h:407:35: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:40:8: note: candidate: 'size_t strlen(char)'
   40 | size_t strlen(const char S);
      |        ^~~~~~
a.cc:40:26: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char'
   40 | size_t strlen(const char S);
      |               ~~~~~~~~~~~^
a.cc:55:27: error: invalid types 'char[int]' for array subscript
   55 |                 if(S[i]==c[t]){
      |                           ^
a.cc:56:28: error: invalid types 'char[int]' for array subscript
   56 |                     while(c[t+N]>26){
      |                            ^
a.cc:57:26: error: invalid types 'char[int]' for array subscript
   57 |                         c[t+N]=c[t+N]-26;
      |                          ^
a.cc:57:33: error: invalid types 'char[int]' for array subscript
   57 |                         c[t+N]=c[t+N]-26;
      |                                 ^
a.cc:59:26: error: invalid types 'char[int]' for array subscript
   59 |                     M=M+c[t+N];
      |                          ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		// 文字列の入力
		String s = sc.next();
		String org = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String con;
		String t = "";
		if ( n == 0 || n == 26 ) {
			con = org;
		} else {
			con = org.substring(n);
			con.concat(org.substring(0,n);
		}
		// 
		for ( int i = 0 ; i < s.length() ; i++ ) {
			String c = s.charAt(i);
			int ps = org.indexOf(c);
			t.concat(con.charAt(ps));
		}
		// 出力
		System.out.println(t);
	}
}



Compiler output:
Main.java:16: error: ')' or ',' expected
			con.concat(org.substring(0,n);
			                             ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  string s;
  cin>>n>>s;
  int l=s.size();
 #include<bits/stdc++.h>
using namespace std;
int main()
{
  int k;
  string newS;
  cin>>k>>newS;
  int l=newS.size();
 for(int i=0; i<l; ++i) 
    { 
        // ASCII value 
        int val = int(s[i]); 
  
        // store the duplicate 
        int dup = k; 
  
        // if k-th ahead character exceed 'z' 
        if(val + k > 122){ 
            k -= (122-val); 
            k = k % 26; 
            newS += char(96 + k); 
        } 
        else
            newS += char(val + k); 
  
        k = dup; 
    } 
  cout<<newS;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main()
      |         ^~
a.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main()
      |         ^~
      |         --
a.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:1: error: a function-definition is not allowed here before '{' token
   12 | {
      | ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

int main()
{
    char alphabets[26] = {'A','B','C','D','E','F','G','H','I','J','K','M','L','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
    
    int num;
    std::string inputs;
    std::cin >> num;
    std::cin >> inputs;
    
    int i, j, k;
    for (i = 0; i < inputs.length(); ++i)
        for (j = 0; j < 26; ++j)
            if (inputs[i] == alphabets[j])
            {
                k = (j + num) % 26;
                std::cout << j << "->" << alphabets[k] << std::endl;
                break;
            }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'string' is not a member of 'std'
    6 |     std::string inputs;
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main()
a.cc:7:10: error: 'cin' is not a member of 'std'
    7 |     std::cin >> num;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:8:10: error: 'cin' is not a member of 'std'
    8 |     std::cin >> inputs;
      |          ^~~
a.cc:8:10: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:17: error: 'inputs' was not declared in this scope
    8 |     std::cin >> inputs;
      |                 ^~~~~~
a.cc:16:22: error: 'cout' is not a member of 'std'
   16 |                 std::cout << j << "->" << alphabets[k] << std::endl;
      |                      ^~~~
a.cc:16:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:64: error: 'endl' is not a member of 'std'
   16 |                 std::cout << j << "->" << alphabets[k] << std::endl;
      |                                                                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
Language: C++

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;

int main() {

    int n;
    cin>>n;
    string s;
    cin>>s;
    string x = " ";
    for (char c : s.toCharArray()) {
            x += Character.toString((char) (((c - 'a' + n) % 26) + 'a'));
    }
    cout<<x;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'toCharArray'
   12 |     for (char c : s.toCharArray()) {
      |                     ^~~~~~~~~~~
a.cc:13:18: error: 'Character' was not declared in this scope
   13 |             x += Character.toString((char) (((c - 'a' + n) % 26) + 'a'));
      |                  ^~~~~~~~~
Language: C++

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;

int main() {

    int n;
    cin>>n;
    string s;
    cin>>s;
    string x = " ";
    for (char c : s.toCharArray()) {
            bar += Character.toString((char) (((c - 'a' + n) % 26) + 'a'));
    }
    cout<<bar;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'toCharArray'
   12 |     for (char c : s.toCharArray()) {
      |                     ^~~~~~~~~~~
a.cc:13:13: error: 'bar' was not declared in this scope
   13 |             bar += Character.toString((char) (((c - 'a' + n) % 26) + 'a'));
      |             ^~~
a.cc:13:20: error: 'Character' was not declared in this scope
   13 |             bar += Character.toString((char) (((c - 'a' + n) % 26) + 'a'));
      |                    ^~~~~~~~~
a.cc:15:11: error: 'bar' was not declared in this scope
   15 |     cout<<bar;
      |           ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main(){
        int rot = 0;
        char *s,*ans;
        char c;
        int i = 0;
        s = malloc(10002);
        ans = malloc(10002);
        scanf("%d\n",&rot);
        fgets(s,10002,stdin);
        while(s[i] != '\n'){
                c = s[i] + rot;
                if(c > 'Z'){
                        c -= 26;
                }
                ans[i] = c;
                i++;
        }
        printf("%s\n",ans);
        return 0;
}
"b.c" 23L

Compiler output:
main.c:24:1: error: expected identifier or '(' before string constant
   24 | "b.c" 23L
      | ^~~~~
Language: Java

import java.util.*;
import static java.lang.System.*;

public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String Alphabet[] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
int N = sc.nextInt();
String S = sc.next();
String ans ="";
int longth = S.length;
for(int i=0;i<longth;i++){
	for(int j=0;j<28;j++){
    if((S.substring(i,i+1)).equals(Alphabet[j])){
    ans = ans+Alphabet[j+N];
    }
	}
out.println(ans);
}

}
}


Compiler output:
Main.java:11: error: cannot find symbol
int longth = S.length;
              ^
  symbol:   variable length
  location: variable S of type String
1 error
Language: C++

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

int main() {
  int N;
  cin >> N;
  string S;
  cin >> S;
  
  int M = S.Length;
  string ans = S;
  
  for (int i = 0; i < M; i++) {
	int pos = 0;
    if (S[i]=='A') pos = 1;
    else if (S[i]=='B') pos = 2; 
    else if (S[i]=='C') pos = 3;
    else if (S[i]=='D') pos = 4;
    else if (S[i]=='E') pos = 5;
    else if (S[i]=='F') pos = 6;
    else if (S[i]=='G') pos = 7;
    else if (S[i]=='H') pos = 8;
    else if (S[i]=='I') pos = 9;
    else if (S[i]=='J') pos = 10;
    else if (S[i]=='K') pos = 11; 
    else if (S[i]=='L') pos = 12; 
    else if (S[i]=='M') pos = 13;
    else if (S[i]=='N') pos = 14;
    else if (S[i]=='O') pos = 15;
    else if (S[i]=='P') pos = 16;
    else if (S[i]=='Q') pos = 17;
    else if (S[i]=='R') pos = 18;
    else if (S[i]=='S') pos = 19;
    else if (S[i]=='T') pos = 20;
    else if (S[i]=='U') pos = 21; 
    else if (S[i]=='V') pos = 22; 
    else if (S[i]=='W') pos = 23;
    else if (S[i]=='X') pos = 24;
    else if (S[i]=='Y') pos = 25;
    else if (S[i]=='Z') pos = 26;
    
    int pos_new = (pos + N) % 26;
    if (pos_new == 1) ans[i] = 'A'; 
    else if (pos_new == 2) ans[i] = 'B'; 
    else if (pos_new == 3) ans[i] = 'C'; 
    else if (pos_new == 4) ans[i] = 'D'; 
    else if (pos_new == 5) ans[i] = 'E'; 
    else if (pos_new == 6) ans[i] = 'F'; 
    else if (pos_new == 7) ans[i] = 'G'; 
    else if (pos_new == 8) ans[i] = 'H'; 
    else if (pos_new == 9) ans[i] = 'I'; 
    else if (pos_new == 10) ans[i] = 'J'; 
    else if (pos_new == 11) ans[i] = 'K'; 
    else if (pos_new == 12) ans[i] = 'L'; 
    else if (pos_new == 13) ans[i] = 'M'; 
    else if (pos_new == 14) ans[i] = 'N'; 
    else if (pos_new == 15) ans[i] = 'O'; 
    else if (pos_new == 16) ans[i] = 'P'; 
    else if (pos_new == 17) ans[i] = 'Q'; 
    else if (pos_new == 18) ans[i] = 'R'; 
    else if (pos_new == 19) ans[i] = 'S'; 
    else if (pos_new == 20) ans[i] = 'T'; 
    else if (pos_new == 21) ans[i] = 'U'; 
    else if (pos_new == 22) ans[i] = 'V'; 
    else if (pos_new == 23) ans[i] = 'W'; 
    else if (pos_new == 24) ans[i] = 'X'; 
    else if (pos_new == 25) ans[i] = 'Y'; 
    else if (pos_new == 0) ans[i] = 'Z'; 
  }
  
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
   10 |   int M = S.Length;
      |             ^~~~~~
      |             length
Language: C++

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

typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)

int main(){
    int n;
    cin >> n;
    string s;
    cin >> s;
    for (int i=0; i<s.size(); i++){
        rep(j,n){
            if (s.at(i)=='Z'){
                s.at(i)='A';
                continue;
            }
            s.at(i)++;
        }
    }
    cout << s << endl;
    return 0;
}


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

import java.util.*;

public class Main {
  public static void main(String[] args){
    List<String> l = new ArrayList<>();
    l.add("A");
    l.add("B");
    l.add("C");
    l.add("D");
    l.add("E");
    l.add("F");
    l.add("G");
    l.add("H");
    l.add("I");
    l.add("J");
    l.add("K");
    l.add("L");
    l.add("N");
    l.add("M");
    l.add("O");
    l.add("P");
    l.add("Q");
    l.add("R");
    l.add("S");
    l.add("T");
    l.add("U");
    l.add("V");
    l.add("W");
    l.add("X");
    l.add("Y");
    l.add("Z");


    Scanner sc = new Scanner(System.in);
    Int a = sc.nextInt();
    String[] b = sc.next().split("");

    for (String string : b) {
      int c = l.indexOf(b);
      System.out.println(l.get((c+a)%26));
    }

    sc.close();
  }
}

Compiler output:
Main.java:35: error: cannot find symbol
    Int a = sc.nextInt();
    ^
  symbol:   class Int
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    List<String> l = new ArrayList<>();
    l.add("A");
    l.add("B");
    l.add("C");
    l.add("D");
    l.add("E");
    l.add("F");
    l.add("G");
    l.add("H");
    l.add("I");
    l.add("J");
    l.add("K");
    l.add("L");
    l.add("N");
    l.add("M");
    l.add("O");
    l.add("P");
    l.add("Q");
    l.add("R");
    l.add("S");
    l.add("T");
    l.add("U");
    l.add("V");
    l.add("W");
    l.add("X");
    l.add("Y");
    l.add("Z");


    Scanner sc = new Scanner(System.in);
    Int a = sc.nextInt();
    String[] b = sc.next().split("");

    for (String string : b) {
      int c = l.indexOf(b);
      System.out.println(l.get((c+a)%26));
    }

    sc.close();
  }
}
import java.util.*;
public class Main {
  public static void main(String[] args){
    List<String> l = new ArrayList<>();
    l.add("A");
    l.add("B");
    l.add("C");
    l.add("D");
    l.add("E");
    l.add("F");
    l.add("G");
    l.add("H");
    l.add("I");
    l.add("J");
    l.add("K");
    l.add("L");
    l.add("N");
    l.add("M");
    l.add("O");
    l.add("P");
    l.add("Q");
    l.add("R");
    l.add("S");
    l.add("T");
    l.add("U");
    l.add("V");
    l.add("W");
    l.add("X");
    l.add("Y");
    l.add("Z");


    Scanner sc = new Scanner(System.in);
    Int a = sc.nextInt();
    String[] b = sc.next().split("");

    for (String string : b) {
      int c = l.indexOf(b);
      System.out.println(l.get((c+a)%26));
    }

    sc.close();
  }
}


Compiler output:
Main.java:45: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
Language: C++

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

int main() {
	char S[10000];
	int n, s;
	char z[] = "Z";
	char a[] = "A";
	cin >> n >> S;
	for (int i = 0; i < strlen(S); i++) {
		s = S[i];
		if (s + n > int(z[0])) s = int(a[0]) + (s + n - int(z[0])) - 1;
		else s += n;
		S[i] = s;
	}
	cout << S << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: 'strlen' was not declared in this scope
   11 |         for (int i = 0; i < strlen(S); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <algorithm>
 
int main()
{
  int N;
  std::string S;
  std::cin >> S;
  std::cin >> N;
  int siz = sizeof(S);
  
  for(int i = 0; i < siz; ++i)
  {
    int sign = S[i];
      int value = sign + N;
      if(value > 90)
        S[i] = S[i] + (value - 90);
    else
      S[i] = S[i] + N;
  }
  
  std::cout << S;
  return 0;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'string' is not a member of 'std'
    6 |   std::string S;
      |        ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <algorithm>
  +++ |+#include <string>
    2 | 
a.cc:7:8: error: 'cin' is not a member of 'std'
    7 |   std::cin >> S;
      |        ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <algorithm>
  +++ |+#include <iostream>
    2 | 
a.cc:7:15: error: 'S' was not declared in this scope
    7 |   std::cin >> S;
      |               ^
a.cc:8:8: error: 'cin' is not a member of 'std'
    8 |   std::cin >> N;
      |        ^~~
a.cc:8:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:8: error: 'cout' is not a member of 'std'
   21 |   std::cout << S;
      |        ^~~~
a.cc:21:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
 
int main()
{
  int N;
  std::string S;
  std::cin >> S;
  std::cin >> N;
  int siz = sizeof(S);
  
  for(int i = 0; i < siz; ++i)
  {
    int sign = S[i];
      int value = sign + N;
      if(value > 90)
        S[i] = S[i] + (value - 90);
    else
      S[i] = S[i] + N;
  }
  
  std::cout << S;
  return 0;
}
    
  }
  

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

#include <iostream>
#include <string>
#include <algorithm>
 
int main()
{
  int N;
  std::string S;
  std::cin >> S;
  std::cin >> N;
  int siz = sizeof(S);
  
  for(int i = 0; i < siz; ++i)
  {
    int sign = S[i];
      value = sign + N;
      if(value > 90)
        S[i] = S[i] + (value - 90);
    else
      S[i] = S[i] + N;
  }
  
  std::cout << S;
  return 0;
}
    
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'value' was not declared in this scope
   16 |       value = sign + N;
      |       ^~~~~
a.cc: At global scope:
a.cc:27:3: error: expected declaration before '}' token
   27 |   }
      |   ^