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

S = raw_input()
print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016'))

Compiler output:
a.cc:2:35: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
    2 | print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016'))
      |                                   ^~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = raw_input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t="CODEFESTIVAL2016";
cin>>s;
int sum=0;
for(int i=0;i<16;i++)if(s[I]!=t[I])sum++;
cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'I' was not declared in this scope
    7 | for(int i=0;i<16;i++)if(s[I]!=t[I])sum++;
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t="CODEFESTIVAL2016";
cin>>s;
int sum=0;
for(int I=0;i<16;i++)if(s[I]!=t[I])sum++;
cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 | for(int I=0;i<16;i++)if(s[I]!=t[I])sum++;
      |             ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;
 
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)

//最大公約数
long gcd(long a, long b){
	if (a%b==0){
		return b;
	}
	else{
		return gcd(b,a%b);
	}
}

//最小公倍数
long lcm(long a, long b){
	return (a*b) / gcd(a,b);
}

typedef long long ll;

char str[17];

int main(){
	char s[] = {"CODEFESTIVAL2016"};
	
	gets(str);
	
	int cnt = 0;
	
	REP(i,16){
		if (str[i] != s[i]) cnt++;
	}
	
	cout << cnt << endl;
	
	return 0;
}

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

#include<stdio.h>

int main(){
	char *seikai="CODEFESTIVAL2016";
	char in[256];
	int i,j=sizeof(seikai);
	int diff=0;
	
	scanf("%s",in);
	
	for(i=0;i<j;i++){
		if(seikai[i]!=in[i]){
			diff++;
		}
	}
	printf("%d",diff)
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:26: error: expected ';' before 'return'
   16 |         printf("%d",diff)
      |                          ^
      |                          ;
   17 |         return 0;
      |         ~~~~~~
Language: Java

import java.util.Scanner;

/**
 * Created by apple on 10/21/16.
 */
public class Main {
    public static void main(String[] args) {
        Scanner s1 = new Scanner(System.in);
        int N = s1.nextInt();
        int A = s2.nextInt();
        int B = s3.nextInt();
        String S = s4.nextLine();

        int count = 0;
        for(int i = 0; i < N; i++) {
            if(S.charAt(i) == 'a' && count < A + B) {
                count++;
                System.out.println("Yes");
            } else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
                count++;
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        int A = s2.nextInt();
                ^
  symbol:   variable s2
  location: class Main
Main.java:11: error: cannot find symbol
        int B = s3.nextInt();
                ^
  symbol:   variable s3
  location: class Main
Main.java:12: error: cannot find symbol
        String S = s4.nextLine();
                   ^
  symbol:   variable s4
  location: class Main
3 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner s1 = new Scanner(System.in);
        int N = s1.nextInt();
        if(N < 1 || N > 100000) {
            throw new IllegalArgumentException();
        }

        Scanner s2 = new Scanner(System.in);
        int A = s2.nextInt();
        if(A < 1 || A > 100000) {
            throw new IllegalArgumentException();
        }

        Scanner s3 = new Scanner(System.in);
        int B = s3.nextInt();
        if(B < 1 || B > 100000) {
            throw new IllegalArgumentException();
        }

        Scanner s4 = new Scanner(System.in);
        String S = s4.nextLine();
        if(S.length() != N) {
            throw new IllegalArgumentException();
        }

        int count = 0;
        for(int i = 0; i < N; i++) {
            if(S.charAt(i) == 'a' && count < A + B) {
                count++;
                System.out.println("Yes");
            } else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
                count++;
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner s1 = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner s1 = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
        Scanner s2 = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
        Scanner s2 = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:15: error: cannot find symbol
        Scanner s3 = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:15: error: cannot find symbol
        Scanner s3 = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:21: error: cannot find symbol
        Scanner s4 = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:21: error: cannot find symbol
        Scanner s4 = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
8 errors
Language: C++

#include <iostream>
#include <ctring>

using namespace std;

int main()
{
    char* x="CODEFESTIVAL2016";
    string a;
    cin>>a;
    int res = 0;
    char b[16];
    strcpy(b,a.c_str());
    for(int i=0;i<16;i++){
        if(x[i]!=b[i]){
            res+=1;
        }
    }
    cout<<res;
    return 0;

}


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

#include <iostream>

using namespace std;

int main()
{
    char* x="CODEFESTIVAL2016";
    string a;
    cin>>a;
    int res = 0;
    char b[16];
    strcpy(b,a.c_str());
    for(int i=0;i<16;i++){
        if(x[i]!=b[i]){
            res+=1;
        }
    }
    cout<<res;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    7 |     char* x="CODEFESTIVAL2016";
      |             ^~~~~~~~~~~~~~~~~~
a.cc:12:5: error: 'strcpy' was not declared in this scope
   12 |     strcpy(b,a.c_str());
      |     ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
int main(){
   int num, a, b;
    
    scanf("%d %d %d", &num, &a, &b);
    char str[num+1];
    scanf("%s", str);
    
    for(int i = 0; i < std::strlen(str); i++){
        if(str[i] == 'a'){
            if(a > 0)
                a--;
            else if( b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
            
        }
        else if(str[i] == 'b'){
            if(b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
        }
        else
            printf("No\n");
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   13 |     for(int i = 0; i < std::strlen(str); i++){
      |                             ^~~~~~
      |                             mbrlen
Language: C++

#include <iostream>
#include <string>

using namespace std;
 
int main(){
   int num, a, b;
    
    scanf("%d %d %d", &num, &a, &b);
    char str[num+1];
    scanf("%s", str);
    
    for(int i = 0; i < strlen(str); i++){
        if(str[i] == 'a'){
            if(a > 0)
                a--;
            else if( b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
            
        }
        else if(str[i] == 'b'){
            if(b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
        }
        else
            printf("No\n");
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: 'strlen' was not declared in this scope
   13 |     for(int i = 0; i < strlen(str); 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 <cstdio>

string str="CODEFESTIVAL2016";

int main(void){
	string s;
	cin >> s;
	int cnt=0;
	for(int i=0;i<16;i++){
		if(s[i]!=str[i])cnt++;
	}
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string str="CODEFESTIVAL2016";
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope; did you mean 'stdin'?
    6 |         string s;
      |         ^~~~~~
      |         stdin
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> s;
      |         ^~~
a.cc:7:16: error: 's' was not declared in this scope
    7 |         cin >> s;
      |                ^
a.cc:10:26: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |                 if(s[i]!=str[i])cnt++;
      |                          ^~~
      |                          std
Language: C++

#include<stdio.h>
#include <string.h>
int main(){
char a[17];
char b[17] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 | if(strcmp(a[i+1],b[i+1])==0){
      |           ~~~~~^
      |                |
      |                char
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:10:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 | if(strcmp(a[i+1],b[i+1])==0){
      |                  ~~~~~^
      |                       |
      |                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

#include<stdio.h>
int main(){
char a[17];
char b[17] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'strcmp' was not declared in this scope
    9 | if(strcmp(a[i+1],b[i+1])==0){
      |    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main(){
Language: C++

#include<stdio.h>
int main(){
char a[16];
char b[16] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",&a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}




Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: initializer-string for 'char [16]' is too long [-fpermissive]
    4 | char b[16] ="CODEFESTIVAL2016";
      |             ^~~~~~~~~~~~~~~~~~
a.cc:9:4: error: 'strcmp' was not declared in this scope
    9 | if(strcmp(a[i+1],b[i+1])==0){
      |    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main(){
Language: C++

 
#include <iostream>

using namespace std;

#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned ll
#define db double
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PII pair<int, int>

string str;
const string right = "CODEFESTIVAL2016";

int main() {
    cin >> str;
    int ans = 0;
    for (int i = 0; i < right.size(); i++) {
        if (right[i] != str[i]) {
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: reference to 'right' is ambiguous
   21 |     for (int i = 0; i < right.size(); i++) {
      |                         ^~~~~
In file included from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/ios_base.h:1070:3: note: candidates are: 'std::ios_base& std::right(ios_base&)'
 1070 |   right(ios_base& __base)
      |   ^~~~~
a.cc:16:14: note:                 'const std::string right'
   16 | const string right = "CODEFESTIVAL2016";
      |              ^~~~~
a.cc:22:13: error: reference to 'right' is ambiguous
   22 |         if (right[i] != str[i]) {
      |             ^~~~~
/usr/include/c++/14/bits/ios_base.h:1070:3: note: candidates are: 'std::ios_base& std::right(ios_base&)'
 1070 |   right(ios_base& __base)
      |   ^~~~~
a.cc:16:14: note:                 'const std::string right'
   16 | const string right = "CODEFESTIVAL2016";
      |              ^~~~~
Language: Java

//セミコロンレスで書いた
class Main{
    public static void main(String[] args){
        for(String[] str : new String[][]{{"CODEFESTIVAL2016",
            new java.util.Scanner(System.in).next()}}){

            for(int[] var : new int[][]{{0, 0}}){
                while(var[0] < str[0].length()){
                    if(str[0].charAt(var[0]) != str[1].charAt(var[0])){
                        var[1]++;
                    }
                    if(var[0]++ > 0){}
                }
                if(System.out.printf("%d\n", var[1]) == null){}
            }
        }
    }

Compiler output:
Main.java:17: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include<stdio.h>
int　main()
{
	char x[20]="C0DEFESTIVAL2O16";
	char y[20];
	scanf("%s",y);
	int cnt=0;
	for(int i=0;i<16;i++)
		if(x[i]!=y[i])cnt++;
	printf("%d",cnt);
	return 0;
}

Compiler output:
a.cc:2:1: error: extended character 　 is not valid in an identifier
    2 | int　main()
      | ^
a.cc:2:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive]
    2 | int　main()
      | ^~~~~~~~~
Language: Java

import java.util.*;
import java.io.*;
public class Main1 {
public static void main(String [] args)throws Exception{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String str = br.readLine();
	int ans = 0;
	String var = "CODEFESTIVAL2016";
	for(int i = 0;i < str.length();i++){
		if(str.charAt(i) != var.charAt(i))++ans;
	}
	System.out.print(ans);
}
}

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

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

int main(){
	string str;
	cin>>str;
	
	long long ans=0;
	string cf="CODEFESTIVAL2016";
	for(int  i=0;i<16;++i){
		if(str[i]!=cfi]){
			++ans;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'cfi' was not declared in this scope; did you mean 'cf'?
   12 |                 if(str[i]!=cfi]){
      |                            ^~~
      |                            cf
a.cc:12:31: error: expected ')' before ']' token
   12 |                 if(str[i]!=cfi]){
      |                   ~           ^
      |                               )
a.cc:12:31: error: expected primary-expression before ']' token
Language: C++

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


int main(){
string str;
cin>>str;
string ans="CODEFESTIVAL2016";
int count=0;
for(int i=0;i<16;++i){
if(str[i]!=ans[i])
count++;
}
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc:16:1: error: 'cout' does not name a type
   16 | cout<<count<<endl;
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
   17 | return 0;
      | ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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


int main(){
string str;
cin>>str::
string ans="CODEFESTIVAL2016";
int count=0;
for(int i=0;i<16;++i){
if(str[i]!=ans[i])
count++;
}
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'str' is not a class, namespace, or enumeration
    8 | cin>>str::
      |      ^~~
a.cc:12:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 | if(str[i]!=ans[i])
      |            ^~~
      |            abs
a.cc: At global scope:
a.cc:16:1: error: 'cout' does not name a type
   16 | cout<<count<<endl;
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
   17 | return 0;
      | ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
    string tmp;
    cin>>tmp;
    string s("CODEFESTIVAL2016");
    int n = s.size();
    int num = 0;
    for(int i =0 ;i<n;++i)
        if(tmp[i]!=s[i])num++
    cout<<num<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before 'cout'
   12 |         if(tmp[i]!=s[i])num++
      |                              ^
      |                              ;
   13 |     cout<<num<<endl;
      |     ~~~~
Language: C

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

#define STRINGSIZE 16

int main (){
    int noCharacters = 0;
    char string[STRINGSIZE];
    char comparedTo[STRINGSIZE] = "CODEFESTIVAL2016";
    scanf("%s",string);
    int i;
    for (i=0;i<STRINGSIZE;i++) {
        if (string[i] != comparedTo[i]) {
            noCharacters++;
        }
    }
/*    if(string[3] == string[5]) {
        if (string[3] != 'E'){
            noCharacters--;
        }*/

    }
    printf("%d",noCharacters);
    return EXIT_SUCCESS;
}

Compiler output:
main.c:23:12: error: expected declaration specifiers or '...' before string constant
   23 |     printf("%d",noCharacters);
      |            ^~~~
main.c:23:17: error: unknown type name 'noCharacters'
   23 |     printf("%d",noCharacters);
      |                 ^~~~~~~~~~~~
main.c:24:5: error: expected identifier or '(' before 'return'
   24 |     return EXIT_SUCCESS;
      |     ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C++

use std::io;

fn read_line() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim().to_owned()
}

fn main() {
    let s = read_line();
    let t = "CODEFESTIVAL2016";

    let mut ans = 0;
    for (c, d) in s.chars().zip(t.chars()) {
        if c != d {
            ans += 1
        }
    }

    println!("{}", ans);
}

Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn read_line() -> String {
      | ^~
a.cc:9:1: error: 'fn' does not name a type
    9 | fn main() {
      | ^~
Language: C++

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

int main(){
    int i,c=0;
    char S[17];
    char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
    scanf("%s",S);
    for(i=0;i<16;i++;){
        if(S[i] != s[i]){c++;}
    }
    cout << c << endl;
    return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before ';' token
    9 |     for(i=0;i<16;i++;){
      |        ~            ^
      |                     )
a.cc:9:22: error: expected primary-expression before ')' token
    9 |     for(i=0;i<16;i++;){
      |                      ^
Language: C++

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

int main(){
    int i,c=0;
    char S[17];
    char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
    scanf("%s",S);
    for(i=0;i<16;i++;){
        if(S[i] == s[i]){c++;}
    }
    cout << c << endl;
    return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before ';' token
    9 |     for(i=0;i<16;i++;){
      |        ~            ^
      |                     )
a.cc:9:22: error: expected primary-expression before ')' token
    9 |     for(i=0;i<16;i++;){
      |                      ^
Language: C++

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

int main(){
    int i,c=0;
    char S[17];
    char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
    scanf("%s",S);
    for(i=0;i<16;i++;){
        if(S[i] == s[i]){c++;}
    }
    cout << c << endl;
    return 0;
}
    

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

int main()
{
	const string word = "CODEFESTIVAL2016";

	string str;

	cin >> str;

	int count = 0;
	for(int i = 0; i < word.size(); ++i) {
		if(word[i] != str[i])
			count++;	
	}

	cout << count;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:15: error: 'string' does not name a type
    3 |         const string word = "CODEFESTIVAL2016";
      |               ^~~~~~
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string str;
      |         ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> str;
      |         ^~~
a.cc:7:16: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |         cin >> str;
      |                ^~~
      |                std
a.cc:10:28: error: 'word' was not declared in this scope
   10 |         for(int i = 0; i < word.size(); ++i) {
      |                            ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   15 |         cout << count;
      |         ^~~~
      |         count
Language: C++

#include <iostream>
#include <string>
using namespace std;
#define INF 1e9
int prime(int cur, bool* visit, int** graph, int m)
{
	int index;
	int sum = 0;
	visit[cur] = true;
	int* dist = new int[m];
	for(int i = 0; i < m; i ++){
		dist[i] = graph[cur][i];    
	}

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

		int mincost = INF;
		for(int j = 0; j < m; j ++){
			if(!visit[j] && dist[j] < mincost){
				mincost = dist[j];
				index = j;    
			}    
		}

		visit[index] = true;
		sum += mincost;


		for(int j = 0; j < m; j ++){
			if(!visit[j] && dist[j] > graph[index][j]){
				dist[j] = graph[index][j];
			}    
		}    
	} 
	return sum;    
} 
int main(){
	int W, H;
	cin >> W >> H;
	int *p = new int[W];
	int *q = new int[H];
	for (int i = 0; i < W; i ++)
	{
		cin >> p[i];
	}
	for (int i = 0; i < H; i ++)
	{
		cin >> q[i];
	}
	int pointCount = (W+1)*(H+1);
	bool *visit = new bool[pointCount];
	memset(visit, false, sizeof(visit));
	int **graph = new int*[pointCount*pointCount];
	for (int i = 0; i < pointCount; i ++)
	{
		graph[i] = new int[pointCount];
		for (int j = 0; j < pointCount; j ++)
		{
			graph[i][j] = INF;
		}

	}
	for (int i = 0; i < pointCount; i ++)
	{
		for (int j = 0; j < pointCount; j ++)
		{
			int idxj = i / W;
			int idxi = i % W;
			int idxj2 = j / W;
			int idxi2 = j % W;
			if(idxi == idxi2 && (idxj == idxj2+1 || idxj == idxj2 - 1)){
				graph[i][j] = q[idxi];
				graph[j][i] = q[idxi];
			}
			if(idxj == idxj2 && (idxi == idxi2+1 || idxi == idxi2 - 1)){
				graph[i][j] = p[idxj];
				graph[j][i] = p[idxj];
			}
		}
	}
	cout << prime(0, visit, graph, pointCount) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'memset' was not declared in this scope
   52 |         memset(visit, false, sizeof(visit));
      |         ^~~~~~
a.cc:2:1: note: 'memset' 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>

using namespace std;

int main(){
	
	char s[16];
	char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
	int i,count=0;
	
	cin>>s;
	
	for(i=0;i<=15;i++){
		if(s[i]!=c[i]){
			count++;
		}
	}
	cout<<count<<"\n";
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'C' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                     ^
a.cc:8:23: error: 'O' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                       ^
a.cc:8:25: error: 'D' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                         ^
a.cc:8:27: error: 'E' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                           ^
a.cc:8:29: error: 'F' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                             ^
a.cc:8:33: error: 'S' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                 ^
a.cc:8:35: error: 'T' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                   ^
a.cc:8:37: error: 'I' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                     ^
a.cc:8:39: error: 'V' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                       ^
a.cc:8:41: error: 'A' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                         ^
a.cc:8:43: error: 'L' was not declared in this scope
    8 |         char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                           ^
Language: C++

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

int main() {
  string d = "CODEFESTIVAL2016";
  string s;
  cin >> s;
  int ans = 0;
  for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
  cout << ans << endl;
  return 0;

}

CODEFESTIVAL2016

Compiler output:
a.cc:16:1: error: 'CODEFESTIVAL2016' does not name a type
   16 | CODEFESTIVAL2016
      | ^~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  string d = "CODEFESTIVAL2016";
  cin >> s;
  int ans = 0;
  for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
  cout << ans << endl;
  return 0;

}

CODEFESTIVAL2016

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc: At global scope:
a.cc:15:1: error: 'CODEFESTIVAL2016' does not name a type
   15 | CODEFESTIVAL2016
      | ^~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  string d = "CODEFESTIVAL2016";
  cin >> s;
  int ans = 0;
  for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
  cout << ans << endl;
  return 0;

}

CODEFESTIVAL2016

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

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


int main() {
    string input_string, ref = 'CODEFESTIVAL2016; 
    int len = 16;
        
    // Read a full line of input from stdin (cin) and save it to our variable, input_string.
    getline(cin, input_string); 
    
    int c = 0;
    for (int i = 0; i < len; i++) {
        if (input_string[i] != ref[i]) c++; 
    }
    
    cout << c << endl;

    return 0;
}


Compiler output:
a.cc:10:32: warning: missing terminating ' character
   10 |     string input_string, ref = 'CODEFESTIVAL2016;
      |                                ^
a.cc:10:32: error: missing terminating ' character
   10 |     string input_string, ref = 'CODEFESTIVAL2016;
      |                                ^~~~~~~~~~~~~~~~~~ 
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'int'
   11 |     int len = 16;
      |     ^~~
a.cc:17:25: error: 'len' was not declared in this scope
   17 |     for (int i = 0; i < len; i++) {
      |                         ^~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
	const string word = "CODEFESTIVAL2016"

	string str;

	cin >> str;

	int count = 0;
	for(int i = 0; i < word.size(); ++i) {
		if(word[i] != str[i])
			count++;	
	}

	cout << count;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ',' or ';' before 'string'
    9 |         string str;
      |         ^~~~~~
a.cc:11:16: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |         cin >> str;
      |                ^~~
      |                std
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main()
{
     string s;
     cin>>s;
     string str ="CODEFESTIVAL2016";
     int res  = 0;
     for(int i =0 ;i<str.length();i++)
     {
          if(s[i]!=str[i])
          {
               res++;
          }
      }
     cout<<res<<endl;
     return 0;
}

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

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  string s,t="CODEFESTIVAL2016";
  cin >> s;
  answer=0;
  REP(i,16) if(s[i]!=t[i]) ++answer;
  cout << answer << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'answer' was not declared in this scope
   13 |   answer=0;
      |   ^~~~~~
Language: Java

import java.util.Scanner;


public class signboard {
	
	private static final String str = "CODEFESTIVAL2016";
	private static int count = 0;
	
	public static void main(String[] args){
		
		Scanner reader = new Scanner(System.in);
		String str1 = reader.next();
		
		for (int i=0;i<16;i++){
			if (str1.charAt(i)!=str.charAt(i)){
				count++;
			}
		}
		
		System.out.println(count);
	}
}


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

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		 Scanner in = new Scanner(System.in);

	    String s = "CODEFESTIVAL2016";
        String tmp = in.nextLine();
        
        int ans =0;
        for(int i=0;i<s.length();i++)
        	if(tmp.charAt(i)!=s.charAt(i))
        		ans++;
        
        System.out.print(ans);
	        

	}

}

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

# include<stdio.h>

main()
{
  char a[16]="CODEFESTIVAL2016";
  char b[16];
  int i,j=0;
  gets(b);
  for(i=0;a[i]!='\0';i++)
    {while(a[i]!=b[i]&&a[i]!='\0') j++}
  printf("%d",j);
}
end

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(b);
      |   ^~~~
      |   fgets
main.c:10:39: error: expected ';' before '}' token
   10 |     {while(a[i]!=b[i]&&a[i]!='\0') j++}
      |                                       ^
      |                                       ;
main.c: At top level:
main.c:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   13 | end
      | ^~~
Language: C

# include<stdio.h>

main()
{
  char a[16]="CODEFESTIVAL2016";
  char b[16];
  int i,j=0;
  gets(b);
  for(i=0;a[i]!='\0';i++)
    {while(a[i]!=b[i]&&a[i]!='\0') j++}
  printf("%d",j);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(b);
      |   ^~~~
      |   fgets
main.c:10:39: error: expected ';' before '}' token
   10 |     {while(a[i]!=b[i]&&a[i]!='\0') j++}
      |                                       ^
      |                                       ;
Language: C++

# include<stdio.h>

main()
{
  char a[16]="CODEFESTIVAL2016";
  char b[16];
  int i,j=0;
  gets(b);
  for(i=0;a[i]!='\0';i++)
    {while(a[i]!=b[i]&&a[i]!='\0') j++}
  printf("%d",j);
}
end

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive]
    5 |   char a[16]="CODEFESTIVAL2016";
      |              ^~~~~~~~~~~~~~~~~~
a.cc:8:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |   gets(b);
      |   ^~~~
      |   getw
a.cc:10:39: error: expected ';' before '}' token
   10 |     {while(a[i]!=b[i]&&a[i]!='\0') j++}
      |                                       ^
      |                                       ;
a.cc: At global scope:
a.cc:13:1: error: 'end' does not name a type
   13 | end
      | ^~~
Language: C++

# include<stdio.h>

main()
{
  char a[16]="CODEFESTIVAL2016";
  char b[16];
  int i,j=0;
  gets(b);
  for(i=0;a[i]!='\0';i++)
    {while(a[i]!=b[i]&&a[i]!='\0') j++}
  printf("%d",j);
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive]
    5 |   char a[16]="CODEFESTIVAL2016";
      |              ^~~~~~~~~~~~~~~~~~
a.cc:8:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |   gets(b);
      |   ^~~~
      |   getw
a.cc:10:39: error: expected ';' before '}' token
   10 |     {while(a[i]!=b[i]&&a[i]!='\0') j++}
      |                                       ^
      |                                       ;
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int count = 0;
		String s = sc.next();
        String sa[];
        sa = new String[s.length()];
        String c = "CODEFESTIVAL2016";
        String ca[];
        ca = new String[c.length()];
        for(int i=0; i<c.length(); i++){
            if(i == c.length - 1){
            ca[i] = c.substring(i);
            sa[i] = s.substring(i);
            }
            else{
            ca[i] = c.substring(i, i+1);
            sa[i] = s.substring(i, i+1);
            }
            if(ca[i] != sa[i]){
            count = count + 1;
            }
        }
		// 出力
		System.out.println(count);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
            if(i == c.length - 1){
                     ^
  symbol:   variable length
  location: variable c of type String
1 error
Language: C++

#include <studio.h>
#include <stdlib.h>
#define SIZE 12

int main(){
   char s[SIZE] = {0};
   scanf("%s",s);
   char * a = "CODEFESTIVAL2016";
   int x = 0;
int t =0;
   while(x < SIZE){
      if(s[x] != a[x]) t++;
      x++;
   }
 printf("%d",t);
return 0;
}

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

public class Main{
    
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        String str = s.next();
        String[] a = new String[16];
        int result = 0;
        a[0] = "C";
        a[1] = "O";
        a[2] = "D";
        a[3] = "E";
        a[4] = "F";
        a[5] = "E";
        a[6] = "S";
        a[7] = "T";
        a[8] = "I";
        a[9] = "V";
        a[10] = "A";
        a[11] = "L";
        a[12] = "2";
        a[13] = "0";
        a[14] = "1";
        a[15] = "6";
        for (int i = 0; i < 16;i++ ){
            if(str.substring(i-1,i).equals(a[i])){
                result ++;
            }
        }
        System.out.println(16-result);
    }
    
}

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

#include<stdio.h>
#include<string.h>
int main(){
char s[20];
char s2="CODEFESTIVAL2016";
int ans=0;
scanf("%s",s);
for (int i=0;i<16;i++)
   if (s[i]!=s2[i]) ans++;
printf("%d",ans);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    5 | char s2="CODEFESTIVAL2016";
      |         ^~~~~~~~~~~~~~~~~~
      |         |
      |         const char*
a.cc:9:16: error: invalid types 'char[int]' for array subscript
    9 |    if (s[i]!=s2[i]) ans++;
      |                ^
Language: C++

#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

int main(){
	
	string str1 = "CODEFESTIVAL2016";
	
	string str2;
	
	cin >> str2;
	
	int ans = 0;
	
	for(int i = 0; i < str1.size(); i++){
		if(str[1] != str[2]){
			ans++;
		}
	}
	
	cout << ans << endl;
	
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'str' was not declared in this scope; did you mean 'str2'?
   19 |                 if(str[1] != str[2]){
      |                    ^~~
      |                    str2
Language: Java

public class Main {
    
    public static void Main(String[] args){
        Scanner s = new Scanner(System.in);
        String str = s.next();
        String[] a = new String[16];
        int result = 0;
        a[0] = "C";
        a[1] = "O";
        a[2] = "D";
        a[3] = "E";
        a[4] = "F";
        a[5] = "E";
        a[6] = "S";
        a[7] = "T";
        a[8] = "I";
        a[9] = "V";
        a[10] = "A";
        a[11] = "L";
        a[12] = "2";
        a[13] = "0";
        a[14] = "1";
        a[15] = "6";
        for (int i = 0; i < 16;i++ ){
            if(str.substring(i-1,i) == a[i]){
                result ++;
            }
        }
        System.out.println(16-result);
    }
    
}

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

#include<stdio.h>

int main(void){
    int cnt = 0;
    char b[16] ;
    char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
    
    scanf(%s,b);

    for(i = 0; i>16; i++){
        if(b[i] != c[i]){
	    b[i] = c[i];
	    cnt = cnt + 1;
	}
    
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:19: error: 'C' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                   ^
main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:21: error: 'O' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                     ^
main.c:6:23: error: 'D' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                       ^
main.c:6:25: error: 'E' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                         ^
main.c:6:27: error: 'F' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                           ^
main.c:6:31: error: 'S' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                               ^
main.c:6:33: error: 'T' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                 ^
main.c:6:35: error: 'I' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                   ^
main.c:6:37: error: 'V' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                     ^
main.c:6:39: error: 'A' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                       ^
main.c:6:41: error: 'L' undeclared (first use in this function)
    6 |     char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
      |                                         ^
main.c:8:11: error: expected expression before '%' token
    8 |     scanf(%s,b);
      |           ^
main.c:10:9: error: 'i' undeclared (first use in this function)
   10 |     for(i = 0; i>16; i++){
      |         ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int count = 0;
		String s = sc.next();
        String sa[];
        sa = new String[s.length()];
        String c = "CODEFESTIVAL2016";
        String ca[];
        ca = new String[c.length()];
        for(i=0; i<c.length(); i++){
            if(i < c.length() -1){
            ca[i] = c.substring(i, i+1);
            sa[i] = s.substring(i, i+1);
            }
            else{
            ca[i] = c.substring(i);
            sa[i] = s.substring(i);
            }
            if(ca[i] == sa[i]){
            count = count + 1;
            }
        }
		// 出力
		System.out.println(s);
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
        for(i=0; i<c.length(); i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
        for(i=0; i<c.length(); i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
        for(i=0; i<c.length(); i++){
                               ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
            if(i < c.length() -1){
               ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            ca[i] = c.substring(i, i+1);
               ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            ca[i] = c.substring(i, i+1);
                                ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            ca[i] = c.substring(i, i+1);
                                   ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            sa[i] = s.substring(i, i+1);
               ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            sa[i] = s.substring(i, i+1);
                                ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            sa[i] = s.substring(i, i+1);
                                   ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
            ca[i] = c.substring(i);
               ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
            ca[i] = c.substring(i);
                                ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
            sa[i] = s.substring(i);
               ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
            sa[i] = s.substring(i);
                                ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
            if(ca[i] == sa[i]){
                  ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
            if(ca[i] == sa[i]){
                           ^
  symbol:   variable i
  location: class Main
16 errors
Language: C

#include<stdio.h>

int void(main){
    int cnt = 0;
    char b[16] ;
    char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
    
    scanf(%s,b);

    for(i = 0; i>16; i++){
        if(b[i] != c[i]){
	    b[i] = c[i];
	    cnt = cnt + 1;
	}
    
    }
    return 0;
}


Compiler output:
main.c:3:5: error: two or more data types in declaration specifiers
    3 | int void(main){
      |     ^~~~
main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int void(main){
      |               ^
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String g = "CODEGESTIVAL2016";
		String rString = scanner.next();
		int j = 0;
		for (int i = 0; i < rString.length(); i++) {
			if (g.charAt(i) != rString.charAt(i)) {
				j++;
			}
		}
		System.out.println(j);
	}

}

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