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

#include<iostream>
#include<string>
using namespace std;
int main() {
  int n;
  char s[100];
  cin >> n;
  cin >>s;
  int l=strlen(s);
  for(int i=0;i<l;++i) {
      if(s[i]+n>=91) s[i]=s[i]-26+n;
      else     s[i]=s[i]+n;
  }
  cout << s << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'strlen' was not declared in this scope
    9 |   int l=strlen(s);
      |         ^~~~~~
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 <bits/stdc++.h>
#define rep(i,N) for(int i=1;i<N;i+=1)
using namespace std;
int main() {
  printf(%d,'A')
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected primary-expression before '%' token
    5 |   printf(%d,'A')
      |          ^
a.cc:5:11: error: 'd' was not declared in this scope
    5 |   printf(%d,'A')
      |           ^
a.cc: At global scope:
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: Java

package virtual_contest;
import java.util.Scanner;
public class B_ROTn {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		char[] s = stdIn.next().toCharArray();
		
		for(int i = 0; i < s.length;i++) {
			int x = s[i] - 'A';
			x = (x+n)%26;
			char a = (char)(x+'A');
			System.out.print(a);
			
			
			
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
			
		}
		
		
		
	}

}


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

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

int main() 
{

	int N;
	int A;
	char S[1000];
	int Len;

	scanf("%d", &N);
	scanf("%s", S);
	Len = strlen(S);

	for (int i = 0; i != Len; i++) {
		if (S[i] + N <= 90) {
			putchar(S[i] + N);
		}
		else {
			A = S[i] + N - 90;
			putchar(64 + A);
		}
	}


	return 0;


Compiler output:
main.c: In function 'main':
main.c:27:9: error: expected declaration or statement at end of input
   27 |         return 0;
      |         ^~~~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<bool> vb;
#define pb push_back
#define fi first
#define se second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<bool> vb;
#define pb push_back
#define fi first
#define se second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
void solve(){
    int n;
    string s;
    cin >> n >> s;
    for(int i = 0; i < s.size(); i++){
        s[i] = (s[i]-'a' + n) % 26 + 'a';
        s[i] -= 32;
        cout << s[i];
    }
}
int main(){
    speed;
    int t = 1;
    //cin >> t;
    while(t--) solve();
}
void solve(){
    int n;
    string s;
    cin >> n >> s;
    for(int i = 0; i < s.size(); i++){
        s[i] = (s[i]-'a' + n) % 26 + 'a';
        cout << s[i];
    }
}
int main(){
    speed;
    int t = 1;
    //cin >> t;
    while(t--) solve();
}

Compiler output:
a.cc:16:24: error: stray '#' in program
   16 | const int INF = 1e9 + 5#define _GLIBCXX_DEBUG
      |                        ^
a.cc:16:25: error: expected ',' or ';' before 'define'
   16 | const int INF = 1e9 + 5#define _GLIBCXX_DEBUG
      |                         ^~~~~~
a.cc:31:11: error: redefinition of 'const int INF'
   31 | const int INF = 1e9 + 5;
      |           ^~~
a.cc:16:11: note: 'const int INF' previously defined here
   16 | const int INF = 1e9 + 5#define _GLIBCXX_DEBUG
      |           ^~~
a.cc:48:6: error: redefinition of 'void solve()'
   48 | void solve(){
      |      ^~~~~
a.cc:32:6: note: 'void solve()' previously defined here
   32 | void solve(){
      |      ^~~~~
a.cc:57:5: error: redefinition of 'int main()'
   57 | int main(){
      |     ^~~~
a.cc:42:5: note: 'int main()' previously defined here
   42 | int main(){
      |     ^~~~
Language: Java

import java.io.*;

class Main
{
  public static void main(String[] args)throws IOException
  {
    BufferedReader br =
     new BufferedReader(new InputStringReader(System.in));

    String N = br.readLine();
    String S = br.readLine();

    int n = Integer.parseInt(N);
   
    for(int i=0; i<28; i++){
       String A = "ABCDEFGHIJKLMNOPQRSTUWXYZ";
  
       char ch = A.charAt(i);

       String B = "ch";
       char a = B.charAt(0);

       int b = A.indexOf(a);

       int c = (n+b)%26;
       char d = A.charAt(c);

       String C = S.replace("ch", "d");

       System.out.print("C");
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
     new BufferedReader(new InputStringReader(System.in));
                            ^
  symbol:   class InputStringReader
  location: class Main
1 error
Language: Java

import java.io.*;

class Main
{
  public static main(String[] args)throws IOException
  {
    BufferedReader br =
     new BufferedReader(new InputStringReader(System.in));

    String N = br.readLine();
    String S = br.readLine();

    int n = Integer.parseInt(N);
   
    for(int i=0; i<28; i++){
       String A = "ABCDEFGHIJKLMNOPQRSTUWXYZ";
  
       char ch = A.charAt(i);

       String B = "ch";
       char a = B.charAt(0);

       int b = A.indexOf(a);

       int c = (n+b)%26;
       char d = A.charAt(c);

       String C = S.replace("ch", "d");

       System.out.print("C");
    }
  }
}

Compiler output:
Main.java:5: error: invalid method declaration; return type required
  public static main(String[] args)throws IOException
                ^
1 error
Language: Java

import java.import.*;

class Main
{
  public static main(String[] args)throws IOException
  {
    BufferedReader br =
     new BufferedReader(new InputStringReader(System.in));

    String N = br.readLine();
    String S = br.readLine();

    int n = Integer.parseInt(N);
   
    for(int i=0; i<28; i++){
       String A = "ABCDEFGHIJKLMNOPQRSTUWXYZ"
  
       char ch = A.charAt(i);

       String B = "ch";
       char a = B.charAt(0);

       int b = A.indexOf(a);

       int c = (n+b)%26;
       char d = A.charAt(c);

       String C = S.replace("ch", "d");

       System.out.print("C");
    }
  }
}


Compiler output:
Main.java:1: error: <identifier> expected
import java.import.*;
            ^
Main.java:1: error: <identifier> expected
import java.import.*;
                  ^
Main.java:5: error: invalid method declaration; return type required
  public static main(String[] args)throws IOException
                ^
Main.java:16: error: ';' expected
       String A = "ABCDEFGHIJKLMNOPQRSTUWXYZ"
                                             ^
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vvd= vector<vd>;
using vc= vector<char>;
#define rep(i,x,n) for(int i=x; i<n; i++)
#define all(x) x.begin(), x.end()

int main(){
  int n;
  string s;
  cin >> n;
  cin >> s;

  for(int i=0; i<n; i++){
    s[i]= 's[i]'' + n;
    if('s[i]' > 'Z'){
      s[i] -= 'Z';
    }
  }
  cout << s << endl;
}


Compiler output:
a.cc:19:11: warning: multi-character character constant [-Wmultichar]
   19 |     s[i]= 's[i]'' + n;
      |           ^~~~~~
a.cc:19:17: warning: missing terminating ' character
   19 |     s[i]= 's[i]'' + n;
      |                 ^
a.cc:19:17: error: missing terminating ' character
   19 |     s[i]= 's[i]'' + n;
      |                 ^~~~~~
a.cc:20:8: warning: multi-character character constant [-Wmultichar]
   20 |     if('s[i]' > 'Z'){
      |        ^~~~~~
a.cc: In function 'int main()':
a.cc:19:11: warning: overflow in conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} changes value from '1935370589' to '93' [-Woverflow]
   19 |     s[i]= 's[i]'' + n;
      |           ^~~~~~
a.cc:19:17: error: expected ';' before 'if'
   19 |     s[i]= 's[i]'' + n;
      |                 ^
      |                 ;
   20 |     if('s[i]' > 'Z'){
      |     ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vvd= vector<vd>;
using vc= vector<char>;
#define rep(i,x,n) for(int i=x; i<n; i++)
#define all(x) x.begin(), x.end()

int main(){
  int n;
  string s;
  cin >> n;
  cin >> s;

  for(int i=0; i<n; i++){
    s[i]= "s[i]" + n;
    if("s[i]" > "Z"){
      s[i] -= "Z";
    }
  }
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   19 |     s[i]= "s[i]" + n;
      |           ~~~~~~~^~~
      |                  |
      |                  const char*
a.cc:21:12: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char*' to binary 'operator-'
   21 |       s[i] -= "Z";
a.cc:21:12: note:   in evaluation of 'operator-=(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}, const char*)'
Language: C++

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

int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  for (int i = 0;  i < S.size(); i++) {
    int next;
    next = ((S.at(i) - 'A') + N)%26;
    S.at(i) = S.at(next + 'A')
  }
  cout << S << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: expected ';' before '}' token
   12 |     S.at(i) = S.at(next + 'A')
      |                               ^
      |                               ;
   13 |   }
      |   ~
Language: C++

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

int main() {
	int N;
	char IS[10000];
	char Alph[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' };
	std::cin >> N >> IS;
	for (int i = 0; i < strlen(IS); i++) {
		for (int I = 0; I < 26 ;I++)
		{
			if (IS[i] == Alph[I]) {
				std::cout << Alph[(I+N)%26];
			}
		}
	};
	return 0;
}


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

#include <bits/stdc++.h>
int main(){
  int N;
  char S[10000];
  char Alph[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'};
  scanf("%d␣%s",&N,S);
  for(int i=0;i++;i < sizeof(S)/sizeof(*S)){
    for(int I=0;I++;I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26];
        };else{S[i] = Alph[I+N];}
      }
    }  
  };
  std::cout<<S;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected '}' before 'else'
   14 |         };else{S[i] = Alph[I+N];}
      |           ^~~~
a.cc:11:7: note: to match this '{'
   11 |       {
      |       ^
a.cc: At global scope:
a.cc:18:8: error: 'cout' in namespace 'std' does not name a type
   18 |   std::cout<<S;
      |        ^~~~
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std::;
int main(){
  int N;
  char S[10000];
  char Alph[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'};
  scanf("%d␣%s",&N,S);
  for(int i=0;i++;i < sizeof(S)/sizeof(*S)){
    for(int I=0;I++;I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  cout<<S;
  return 0;
}

Compiler output:
a.cc:2:22: error: expected identifier before ';' token
    2 | using namespace std::;
      |                      ^
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before '}' token
   14 |         S[i] = Alph[I+N-26]
      |                            ^
      |                            ;
   15 |         }else{S[i] = Alph[I+N]}
      |         ~                   
a.cc:15:31: error: expected ';' before '}' token
   15 |         }else{S[i] = Alph[I+N]}
      |                               ^
      |                               ;
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout<<S;
      |   ^~~~
      |   std::cout
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
int main(){
  int N;
  char S[10000];
  char Alph[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'};
  scanf("%d␣%s",&N,S);
  for(int i=0;i++;i < sizeof(S)/sizeof(*S)){
    for(int I=0;I++;I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |         S[i] = Alph[I+N-26]
      |                            ^
      |                            ;
   14 |         }else{S[i] = Alph[I+N]}
      |         ~                   
a.cc:14:31: error: expected ';' before '}' token
   14 |         }else{S[i] = Alph[I+N]}
      |                               ^
      |                               ;
Language: C++

#include <bits/stdc++.h>
int main(){
  int N;
  char S[10000];
  char Alph[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'};
  scanf("%d␣%s",&N,S);
  for(int i=0,i++,(i<10000)&&(S[i]!=nullptr)){
    for(int I=0,I++,I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before '++' token
    7 |   for(int i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |                ^~
      |                ;
a.cc:7:18: error: expected primary-expression before ',' token
    7 |   for(int i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |                  ^
a.cc:7:35: error: invalid operands of types 'char' and 'std::nullptr_t' to binary 'operator!='
    7 |   for(int i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |                               ~~~~^~~~~~~~~
a.cc:7:45: error: expected ';' before ')' token
    7 |   for(int i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |                                             ^
      |                                             ;
a.cc:8:18: error: expected ';' before '++' token
    8 |     for(int I=0,I++,I<26)
      |                  ^~
      |                  ;
a.cc:8:20: error: expected primary-expression before ',' token
    8 |     for(int I=0,I++,I<26)
      |                    ^
a.cc:8:25: error: expected ';' before ')' token
    8 |     for(int I=0,I++,I<26)
      |                         ^
      |                         ;
a.cc:13:28: error: expected ';' before '}' token
   13 |         S[i] = Alph[I+N-26]
      |                            ^
      |                            ;
   14 |         }else{S[i] = Alph[I+N]}
      |         ~                   
a.cc:14:31: error: expected ';' before '}' token
   14 |         }else{S[i] = Alph[I+N]}
      |                               ^
      |                               ;
Language: C++

#include <bits/stdc++.h>
int main(){
  int N;
  char S[10000];
  char Alph[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'};
  scanf("%d␣%s",&N,S);
  for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
    for(I=0,I++,I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |       ^
a.cc:18:12: error: expected ')' before ';' token
   18 |   printf(S);
      |            ^
      |            )
a.cc:7:6: note: to match this '('
    7 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |      ^
Language: C++

#include <bits/stdc++.h>
int main(){
  int N;
  char S[10000];
  char Alph[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"];
  scanf("%d␣%s",&N,S);
  for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
    for(I=0,I++,I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected identifier before string constant
    5 |   char Alph[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"];
      |                   ^~~
a.cc:5:22: error: expected ']' before ',' token
    5 |   char Alph[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"];
      |                      ^
      |                      ]
a.cc: In lambda function:
a.cc:5:22: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:5:18: error: array must be initialized with a brace-enclosed initializer
    5 |   char Alph[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"];
      |                  ^~~~
a.cc:5:23: error: expected unqualified-id before string constant
    5 |   char Alph[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"];
      |                       ^~~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |       ^
a.cc:18:12: error: expected ')' before ';' token
   18 |   printf(S);
      |            ^
      |            )
a.cc:7:6: note: to match this '('
    7 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |      ^
Language: C++

int main(){
  int N;
  char S[10000];
  char Alph[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"];
  scanf("%d␣%s",&N,S);
  for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
    for(I=0,I++,I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: expected identifier before string constant
    4 |   char Alph[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"];
      |                   ^~~
a.cc:4:22: error: expected ']' before ',' token
    4 |   char Alph[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"];
      |                      ^
      |                      ]
a.cc: In lambda function:
a.cc:4:22: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:4:18: error: array must be initialized with a brace-enclosed initializer
    4 |   char Alph[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"];
      |                  ^~~~
a.cc:4:23: error: expected unqualified-id before string constant
    4 |   char Alph[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"];
      |                       ^~~
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%d␣%s",&N,S);
      |   ^~~~~
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |       ^
a.cc:17:3: error: 'printf' was not declared in this scope
   17 |   printf(S);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:17:12: error: expected ')' before ';' token
   17 |   printf(S);
      |            ^
      |            )
a.cc:6:6: note: to match this '('
    6 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |      ^
Language: C++

int main(){
  int N;
  char[10000] S;
  char[26] Alph = [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];
  scanf("%d␣%s",&N,S);
  for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
    for(I=0,I++,I<26)
    {
      if(Alph[I]==S[i])
      {
        if(26<I+N){
        S[i] = Alph[I+N-26]
        }else{S[i] = Alph[I+N]}
      }
    }  
  };
  printf();
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: expected identifier before numeric constant
    3 |   char[10000] S;
      |        ^~~~~
a.cc:3:8: error: expected ']' before numeric constant
    3 |   char[10000] S;
      |        ^~~~~
      |        ]
a.cc:3:7: error: structured binding declaration cannot have type 'char'
    3 |   char[10000] S;
      |       ^
a.cc:3:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:3:7: error: empty structured binding declaration
a.cc:3:15: error: expected initializer before 'S'
    3 |   char[10000] S;
      |               ^
a.cc:4:8: error: expected identifier before numeric constant
    4 |   char[26] Alph = [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.cc:4:8: error: expected ']' before numeric constant
    4 |   char[26] Alph = [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.cc:4:7: error: structured binding declaration cannot have type 'char'
    4 |   char[26] Alph = [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.cc:4:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:7: error: empty structured binding declaration
a.cc:4:12: error: expected initializer before 'Alph'
    4 |   char[26] Alph = [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.cc:5:20: error: 'S' was not declared in this scope
    5 |   scanf("%d␣%s",&N,S);
      |                    ^
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%d␣%s",&N,S);
      |   ^~~~~
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |       ^
a.cc:17:3: error: 'printf' was not declared in this scope
   17 |   printf();
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:17:11: error: expected ')' before ';' token
   17 |   printf();
      |           ^
      |           )
a.cc:6:6: note: to match this '('
    6 |   for(i=0,i++,(i<10000)&&(S[i]!=nullptr)){
      |      ^
Language: C++

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

int main() {
	int a,b,c,d,e;
  	string s;
    cin>>a>>s;
  b = s.size()
  for(int i=0;i<b;i++){
int x=s.at(i)-'A';
 x=(x+a)%26;
 putchar('A'+x);
  }
  cout<<endl;
 
 
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'for'
    8 |   b = s.size()
      |               ^
      |               ;
    9 |   for(int i=0;i<b;i++){
      |   ~~~          
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<b;i++){
      |               ^
Language: C++

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

int main() {
	int a,b,c,d,e;
  	string s;
    cin>>a>>s;
  for(i=0;i<N;i++){
int x=s.at(i)-'A';
 x=(x+n)%26;
 putchar('A'+x);
  }
  cout<<endl;
 
 
    
  return 0;
}

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

#include<stdio.h>
int main(){
int n;
char s;
scanf("%d",&n);
scanf("%c",&s);
while(s[i]!='\0'){
  s[i]+=n;
  i++;}
print("%c",s)
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
    7 | while(s[i]!='\0'){
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   10 | print("%c",s)
      | ^~~~~
      | printf
main.c:10:14: error: expected ';' before '}' token
   10 | print("%c",s)
      |              ^
      |              ;
   11 | }
      | ~
Language: C

#include<stdio.h>
int main(){
int n;
char s;
scanf("%d",&n);
scanf("%c",&s);
while(s[i]!='\0')
  s[i]+=n;
  i++;
print("%c",s)
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
    7 | while(s[i]!='\0')
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   10 | print("%c",s)
      | ^~~~~
      | printf
main.c:10:14: error: expected ';' before '}' token
   10 | print("%c",s)
      |              ^
      |              ;
   11 | }
      | ~
Language: C

#include<stdio.h>
int main(){
int n;
char s;
scanf("%d",&n);
scanf("%c",&s);
while(s[i]!='\0')
  s[i]+=n;
print("%c",s)
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
    7 | while(s[i]!='\0')
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 | print("%c",s)
      | ^~~~~
      | printf
main.c:9:14: error: expected ';' before '}' token
    9 | print("%c",s)
      |              ^
      |              ;
   10 | }
      | ~
Language: C

#include<stdio.h>
int main(){
int n;
char s;
scanf("%d",&n);
scanf("%c",&s);
while(s[i]!='\0')
  s[i]+=n;
print("%c",s)

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
    7 | while(s[i]!='\0')
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 | print("%c",s)
      | ^~~~~
      | printf
main.c:9:14: error: expected ';' at end of input
    9 | print("%c",s)
      |              ^
      |              ;
main.c:9:1: error: expected declaration or statement at end of input
    9 | print("%c",s)
      | ^~~~~
Language: C++

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
prep(char a[],int cut)
{
	static int j=0;
	int cuts=cut;
	int len=strlen(a);
	while(cuts<len)
	{
		
		for(int i=0;i<=cut;i++)
		{
		if(int(a[cuts]+i)>90)
		{
		a[cuts]=65;
		i=0;
		--cut;
	}
		
		cout<<char(a[cuts]+i);
	}
    cuts+=cut+1;
}
}
int main()
{
	
	int cut;
char a[100000];
cin>>cut>>a;
	

	prep(a,cut);
}

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'prep' with no type [-fpermissive]
    4 | prep(char a[],int cut)
      | ^~~~
a.cc: In function 'int prep(char*, int)':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
Language: Java

import java.io.PrintWriter;
import java.util.Scanner;

public class ABC146_B {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        String S = sc.next();
        PrintWriter pw = new PrintWriter(System.out);
        for (char c : S.toCharArray()) {
            int i = c+N;
            pw.print((char) (i > 90 ? i-26 : i));
        }
        pw.println();
        pw.flush();
    }
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N;
  cin >> N;
  string s;
  cin >> s;
  for(int i = 0; i < s.length; i++){
    s[i] += N;
    if(s[i] > 'Z'){
      s[i] -= 'Z' - 'A' + 1;
    }
  }
  cout << s << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |   for(int i = 0; i < s.length; i++){
      |                      ~~^~~~~~
      |                              ()
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N;
  cin >> N;
  string s;
  cin >> s;
  for(int i = 0; i < strlen(s); i++){
    s[i] += N;
    if(s[i] > 'Z'){
      s[i] -= 'Z' - 'A' + 1;
    }
  }
  cout << s << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'strlen' was not declared in this scope
    9 |   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<iostream>
#include<string>
int main(){
  int N;
  cin >> N;
  string s;
  cin >> s;
  for(int i = 0; i < strlen(s); i++){
    s[i] += N;
    if(s[i] > 'Z'){
      s[i] -= 'Z' - 'A' + 1;
    }
  }
  cout << s << endl;
  
  return 0;
}

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

    #include<stdio.h>
    void changeString(int N,char *p){
      while(*p){
        if(*p+N<='Z') *p=*p+N;
        else *p=*p+N-26;
        printf("%c",*p);
        p++;
      }
      return
    }
    int main(){
      int N;
      char c[10001];
      scanf("%d",&N);
      scanf("%s",c);
      changeString(N,c);
      printf("\n");
      return 0;
    }

Compiler output:
a.cc: In function 'void changeString(int, char*)':
a.cc:10:5: error: expected primary-expression before '}' token
   10 |     }
      |     ^
a.cc:9:13: error: expected ';' before '}' token
    9 |       return
      |             ^
      |             ;
   10 |     }
      |     ~
Language: C++

#include<stdio.h>
void changeString(int n,char *p){
  while(*p){
    if(*p+N<='Z') *p=*p+N;
    else *p=*p+N-26;
    printf("%c",*p);
    p++;
  }
  return
}
int main(){
  int N;
  char c[10001];
  scanf("%d",&N);
  scanf("%s",c);
  changeString(N,c);
  printf("\n");
  return 0;
}

Compiler output:
a.cc: In function 'void changeString(int, char*)':
a.cc:4:11: error: 'N' was not declared in this scope
    4 |     if(*p+N<='Z') *p=*p+N;
      |           ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
a.cc:9:9: error: expected ';' before '}' token
    9 |   return
      |         ^
      |         ;
   10 | }
      | ~
Language: C

#include<stdio.h>
#include<string.h>
 
int main(){
	int a;
  	char s[26]={"abcdefghijklmnopqrstuvwxyz"};
  	char h[10002]; 	
  	scanf("%d %s",&a,h);
	
  	for(int i=0; i<strlen(h); i++){
      for(int j=0; j<26; j++){
      	if(strcmp(h[i],s[j])==0)){
        	printf("%c", h[i+a]);
        }
      }
    }
  
  	printf("\n");
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |         if(strcmp(h[i],s[j])==0)){
      |                   ~^~~
      |                    |
      |                    char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:25: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |         if(strcmp(h[i],s[j])==0)){
      |                        ~^~~
      |                         |
      |                         char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:12:33: error: expected statement before ')' token
   12 |         if(strcmp(h[i],s[j])==0)){
      |                                 ^
Language: C

#include<stdio.h>
#include<string.h>
 
int main(){
	int a;
  	char s[26]="abcdefghijklmnopqrstuvwxyz";
  	char h[10002]; 	
  	scanf("%d %s",a,h);
	
  	for(i=0, i<strlen(h),i++){
      for(j=0, j<26, j++){
      	if(h[i]==s[j]){
        	printf("%c", h[i+a]);
        }
      }
    }
  
  	printf("\n");
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:13: error: 'i' undeclared (first use in this function)
   10 |         for(i=0, i<strlen(h),i++){
      |             ^
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:33: error: expected ';' before ')' token
   10 |         for(i=0, i<strlen(h),i++){
      |                                 ^
      |                                 ;
main.c:10:33: error: expected expression before ')' token
main.c:11:11: error: 'j' undeclared (first use in this function)
   11 |       for(j=0, j<26, j++){
      |           ^
main.c:11:25: error: expected ';' before ')' token
   11 |       for(j=0, j<26, j++){
      |                         ^
      |                         ;
main.c:11:25: error: expected expression before ')' token
Language: C

#include <stdio.h>
int main (void)
{
  int n;
  char s[10001];
  scanf("%s",s);
  
  for (i=0; i<'\n'; i++){
    s[i] = (s[i] - 'A' + n)%26;
  }
  
  printf("%s",s);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:8: error: 'i' undeclared (first use in this function)
    8 |   for (i=0; i<'\n'; i++){
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  int N;
  string S,order;
  cin >> N;
  cin >> S;
  order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int d;
  d = N%26;
  for (int i = 0; i < N; i++) {
    char target;
    target = S.at(i);
    for (int j = 0; j < 26; j++) {
      int target_num,after_num;
      if (target == order.at(j)) {
        target_num = j;
    after_num = (target_num + d)%26;
    S.at(i) = order.at(after_num);
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:12:31: note: to match this '{'
   12 |   for (int i = 0; i < N; i++) {
      |                               ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N;
  string S,order;
  cin >> N;
  cin >> S;
  order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int d;
  d = N%26;
  for (int i = 0; i < N; i++) {
    char target;
    target = S.at(i);
    for (int j = 0; j < 26; j++) {
      int target_num,after_num;
      if (target == order.at(j)) {
        target_num = j;
      }
    }
    after_num = (target_num + d)%26;
    S.at(i) = order.at(after_num);
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'after_num' was not declared in this scope
   21 |     after_num = (target_num + d)%26;
      |     ^~~~~~~~~
a.cc:21:18: error: 'target_num' was not declared in this scope; did you mean 'target'?
   21 |     after_num = (target_num + d)%26;
      |                  ^~~~~~~~~~
      |                  target
Language: C++

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

int main() {
  int N;
  string S,order;
  cin >> N;
  cin >> S;
  order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int d;
  d = N%26;
  for (int i = 0; i < N; i++) {
    target = S.at(i);
    for (int j = 0; j < 26; j++) {
      if (target == order.at(j)) {
        target_num = j;
      }
    }
    after_num = (target_num + d)%26;
    S.at(i) = order.at(after_num);
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'target' was not declared in this scope
   13 |     target = S.at(i);
      |     ^~~~~~
a.cc:16:9: error: 'target_num' was not declared in this scope
   16 |         target_num = j;
      |         ^~~~~~~~~~
a.cc:19:5: error: 'after_num' was not declared in this scope
   19 |     after_num = (target_num + d)%26;
      |     ^~~~~~~~~
a.cc:19:18: error: 'target_num' was not declared in this scope
   19 |     after_num = (target_num + d)%26;
      |                  ^~~~~~~~~~
Language: C++

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

int main() {
  int N;
  string S,order;
  cin >> N;
  cin >> S;
  order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int d;
  d = N%26
  for (int i = 0; i < N; i++) {
    target = S.at(i);
    for (int j = 0; j < 26; j++) {
      if (target == order.at(j)) {
        target_num = j;
      }
    }
    after_num = (target_num + d)%26;
    S.at(i) = order.at(after_num);
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before 'for'
   11 |   d = N%26
      |           ^
      |           ;
   12 |   for (int i = 0; i < N; i++) {
      |   ~~~      
a.cc:12:19: error: 'i' was not declared in this scope
   12 |   for (int i = 0; i < N; i++) {
      |                   ^
Language: C++

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

int main() {
  int N;
  string S,order;
  cin >> N;
  cin >> S;
  order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  d = N%26
  for (int i = 0; i < N; i++) {
    target = S.at(i);
    for (int j = 0; j < 26; j++) {
      if (target == order.at(j)) {
        target_num = j;
      }
    }
    after_num = (target_num + d)%26;
    S.at(i) = order.at(after_num);
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'd' was not declared in this scope
   10 |   d = N%26
      |   ^
a.cc:11:19: error: 'i' was not declared in this scope
   11 |   for (int i = 0; i < N; i++) {
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
string s;
cin >> n >> s;
for(int i=0;i<s.size();i++){
for(int j=0;j<n;j++){
s[i]++;
if(s[i]>=91 ||s[i]<=64){
s[i]=65;
}
}
}
cout << s <<endl;

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

#include <iostream>
using namespace std;
int main() {
  int n;
  string str;
  cin >> n >> str;
  for(int i=0; i<str.size(); i++) {
    s[i]+=n;
    if(s[i]>90)
      s[i]-26;
  }
  cout << str << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 's' was not declared in this scope
    8 |     s[i]+=n;
      |     ^
Language: C++

/*
我的心脏怦怦跳，监管者就在附近
*/
#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>
#include<string>
#include<iostream>
#include<cmath>
#include<set>
#include<stack>
#include<queue>
#include<unistd.h>
#include<stdio.h>
#include<cstring>
#define random(a,b) (rand()%(b-a+1)+a)
using namespace std;
bool prime(int x){
	 int i;
	 if(x<2) return 0;
	 for(i=2;i*i<=x;i++){
		if(x%i==0){return 0;}
	 }
	 return 1;
}
int a[1001];
int main()
{
	int x;
	string st;
	cin>>st;
	int i;
	for(i=0;i<st.size;++i)
	{
		a[i]=st[i]-96;
		a[i]+=x;
		a[i]%=26;
		a[i]+=96;
	}
	for(i=0;i<st.size();++i){
		cout<<char(a[i]); 
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:22: 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 '()' ?)
   32 |         for(i=0;i<st.size;++i)
      |                   ~~~^~~~
      |                          ()
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

char a[100000];
int b[100000];
int n;

int main() {
  cin>>n;
  cin>>a;
  int s=strlen(a);
  for(int i=0;i<s;i++)
      b[i]=a[i];
  for(int i=0;i<s;i++)
  {    b[i]=b[i]+n;
      if(b[i]>90)
          b[i]=b[i]%90+64;
  }
  for(int i=0;i<s2
          ABCXYZ;i++)
  {    a[i]=b[i];
     cout<<a[i];
  }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 's2' was not declared in this scope; did you mean 's'?
   21 |   for(int i=0;i<s2
      |                 ^~
      |                 s
a.cc:21:19: error: expected ';' before 'ABCXYZ'
   21 |   for(int i=0;i<s2
      |                   ^
      |                   ;
   22 |           ABCXYZ;i++)
      |           ~~~~~~   
a.cc:22:11: error: 'ABCXYZ' was not declared in this scope
   22 |           ABCXYZ;i++)
      |           ^~~~~~
a.cc:22:17: error: expected ')' before ';' token
   22 |           ABCXYZ;i++)
      |                 ^
      |                 )
a.cc:21:6: note: to match this '('
   21 |   for(int i=0;i<s2
      |      ^
a.cc:22:18: error: 'i' was not declared in this scope
   22 |           ABCXYZ;i++)
      |                  ^
Language: C++

#include <bits/stdc++.h>

#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begin(), v.end()
#define INF 1e9

using namespace std;

/**
 * calculate GCD(greatest common divisor)
 * @param a
 * @param b
 * @return
 */
unsigned euclidean_gcd(unsigned a, unsigned b) {
    if (a < b) return euclidean_gcd(b, a);
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}

/**
 * change minimum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMinimum(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * change maximum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMaximum(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * output answer
 * @tparam T
 * @param answer
 * @return
 */
template<typename T>
T output(T answer) {
    cout << answer << endl;
    return 0;
}

/** ----from here ---------------------------------------------------------- */

int main() {
    int N;
    string S;
    cin >> N >> S;
    for (int i = 0; i < s.size(); ++i) {
        int number = S[i] - 'A';
        int added = (number + N) % 26;
        cout << (char) (added - 'A');
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:25: error: 's' was not declared in this scope
   83 |     for (int i = 0; i < s.size(); ++i) {
      |                         ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class abc146_b {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        String s = br.readLine();
        String alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTJABC";
        String out = "";
        for (int i=0; i<s.length(); i++) {
            int temp = alph.indexOf(s.charAt(i));
            temp += N;
            out += alph.charAt(temp);
        }
        System.out.println(out);
    }
}


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