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

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

int main()
{
    string s1,s2l
    int ans=0;
    cin>>s1>>s2;
    for(int i=0;i<3;i++)
        if(s1[i]==s2[i])
            ++ans;
        cout<<ans;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'int'
    7 |     int ans=0;
      |     ^~~
a.cc:8:14: error: 's2' was not declared in this scope; did you mean 's1'?
    8 |     cin>>s1>>s2;
      |              ^~
      |              s1
a.cc:11:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |             ++ans;
      |               ^~~
      |               abs
a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

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

int main()
{
    string s1,s2l
    int ans=0
    cin>>s1>>s2;
    for(int i=0;i<3;i++)
        if(s1[i]==s2[i])
            ++ans;
        cout<<ans;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'int'
    7 |     int ans=0
      |     ^~~
a.cc:10:19: error: 's2' was not declared in this scope; did you mean 's1'?
   10 |         if(s1[i]==s2[i])
      |                   ^~
      |                   s1
a.cc:11:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |             ++ans;
      |               ^~~
      |               abs
a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |         cout<<ans;
      |               ^~~
      |               abs
Language: C

#include<stdio.h>
int main()
{
    char S[4],n[4];
    int i,j=0;
  
    scanf("%s%s",S,n);
  
    for(i=0;i<3;i++){
      if(S[i]==n[i]) j++;
    }
      
    printf("%d\n",j);

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected declaration or statement at end of input
   13 |     printf("%d\n",j);
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define all(x) (x).begin(), (x).end()
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
int k=0,n=0, m=0, l=0,a=0, b=0, c=0, d=0,ans=0,ans2=0,x=0,y=0;
string s,t,S;
signed main() {
    //cin >> n;
    //n >> x >> y;
    cin >> s >> t;
  REP(i,s.siAze()){
  if(s[i]==t[i])ans++;
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'siAze'; did you mean 'size'?
   24 |   REP(i,s.siAze()){
      |           ^~~~~
a.cc:4:45: note: in definition of macro 'REP'
    4 | #define REP(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 1000000007
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//name[i][j]-> vvl name(i,vl(j))
//map<int,int>mp
//�]���؂�グ�� =>  (a + b - 1) / b 

signed main(){
	string s,t; cin>>s>>t;
  int ans-0;
  rep(i,0,3)ans+=(s[i]==t[i]);
  cout<<ans;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: expected initializer before '-' token
   20 |   int ans-0;
      |          ^
a.cc:21:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   rep(i,0,3)ans+=(s[i]==t[i]);
      |             ^~~
      |             abs
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout<<ans;
      |         ^~~
      |         abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 1000000007
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//name[i][j]-> vvl name(i,vl(j))
//map<int,int>mp
//�]���؂�グ�� =>  (a + b - 1) / b 

signed main(){
	string s,t; cin>>s>>t;
  int ans-0;
  rep(i,0,n)ans+=(s[i]==t[i]);
  cout<<ans;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: expected initializer before '-' token
   20 |   int ans-0;
      |          ^
a.cc:21:11: error: 'n' was not declared in this scope
   21 |   rep(i,0,n)ans+=(s[i]==t[i]);
      |           ^
a.cc:9:58: note: in definition of macro 'rep'
    9 | #define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
      |                                                          ^
a.cc:21:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   rep(i,0,n)ans+=(s[i]==t[i]);
      |             ^~~
      |             abs
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout<<ans;
      |         ^~~
      |         abs
Language: C

#include<stdio.h>
int main(void)
{
    char S[4];T[4];
    int i,j;
  
    scanf("%s",S);
    scanf("%s",T);
  
    for(i=0;i<3;i++){
      if(S[i]==T[i]) j++;
    }
      
    printf("%d/n",j);
  
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'T' undeclared (first use in this function)
    4 |     char S[4];T[4];
      |               ^
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    String T =sc.next();
    String t[] =T.split("",0);
    int ans=0;
    for(int i=0;i<3;i++){
      if(s[i].equals(t[i])){ans =ans+1;}}
    System.ouut.println(ans);
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
    System.ouut.println(ans);
          ^
  symbol:   variable ouut
  location: class System
1 error
Language: C++

#include <bits/stdc++.h>
#include<iostream>
using namespace std;
 
int main() {
  string s,t;
  cin >> s >> t;
  int ans(0);
  for(int i = 0;i < 3;i++){
  	if(s.at(i) == t.at(i)){
    	ans++;
    }
  {
   cout << ans;
}
   


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

#include<bits/stdc++.h>
using namespace std;
4 int main() {
string str, t;
cin >> str >> t;
int ans = 0;
if(str[0] == t[0]) 
  ans++;
if(str[1] == t[1]) 
  ans++;
if(str[2] == t[2]) 
  ans++;
cout << ans ;
return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 4 int main() {
      | ^
Language: C++

#include<bits/stdc++.h>
2 using namespace std;
3
4 int main() {
5 string s, t;
6 cin >> s >> t;
7 int ans = 0;
8 if(s[0] == t[0]) ans++;
9 if(s[1] == t[1]) ans++;
10 if(s[2] == t[2]) ans++;
11 cout << ans << endl;
12 return 0;
13 }


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3
      | ^
Language: C++

	string S, T;
	cin >> S >> T;
	int count = 0;
	rep(i, S.length()) {
		if (S[i] == T[i])count++;
	}
	cout << count << endl;


Compiler output:
a.cc:1:9: error: 'string' does not name a type
    1 |         string S, T;
      |         ^~~~~~
a.cc:2:9: error: 'cin' does not name a type
    2 |         cin >> S >> T;
      |         ^~~
a.cc:4:12: error: expected constructor, destructor, or type conversion before '(' token
    4 |         rep(i, S.length()) {
      |            ^
a.cc:7:9: error: 'cout' does not name a type
    7 |         cout << count << endl;
      |         ^~~~
Language: C

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

 int main() {
 string s, t;
 cin >> s >> t;
 int ans = 0;
 if(s[0] == t[0]) ans++;
 if(s[1] == t[1]) ans++;
 if(s[2] == t[2]) ans++;
 cout << ans << endl;
 return 0;
 }

Compiler output:
main.c: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>
using namespace std;

int main() {
  int a,b;
  cin>>a>>b;
  int c=1;cnt=0;
  while(c<b){
    c+=a-1;
    cnt++;
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
    7 |   int c=1;cnt=0;
      |           ^~~
      |           int
Language: C++

#include<bits/stdc++.h>
#define fast_io ios_base::sync_with_stdio(NULL); cin.tie(NULL);
#define endl '\n'
using namespace std;


int main(){
        fast_io
        string s,t;
        cin>>s>>t;
        int c=0;
        for(int i=0;<3;i++)
            if(s[i]==t[i])
                c++;
            cout<<c<<endl;
    return 0;
}



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

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

int main() {
	string s, t;
	cin >> s >> t;
    int ans = 0;
	for (int i = 0; i < n; i++) {
		if (s[i] == t[i]) ans++;
	}
	cout << ans << "\n";
	return 0;
}

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

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

 
int main() {
string S,T;
  int count=0;
  for(int i=0,i<3,i++){
  if(Ss.at(i)==Ts.at(i)){
  count++;}
  
  
  
  
  }
cout<<count<<endl;





}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<' token
    8 |   for(int i=0,i<3,i++){
      |                ^
      |                ;
a.cc:8:16: error: expected primary-expression before '<' token
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0,i<3,i++){
      |                      ^
      |                      ;
a.cc:9:6: error: 'Ss' was not declared in this scope; did you mean 'S'?
    9 |   if(Ss.at(i)==Ts.at(i)){
      |      ^~
      |      S
a.cc:9:16: error: 'Ts' was not declared in this scope; did you mean 'T'?
    9 |   if(Ss.at(i)==Ts.at(i)){
      |                ^~
      |                T
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  tring s,t;
  cin>>s>>t;
  intans= 0;
  if(s[0] ==t[0])ans++;
  if(s[1] ==t[1])ans++;
  if(s[2] ==t[2])ans++;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'tring' was not declared in this scope
    4 |   tring s,t;
      |   ^~~~~
a.cc:5:8: error: 's' was not declared in this scope
    5 |   cin>>s>>t;
      |        ^
a.cc:5:11: error: 't' was not declared in this scope; did you mean 'tm'?
    5 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:6:3: error: 'intans' was not declared in this scope
    6 |   intans= 0;
      |   ^~~~~~
a.cc:7:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |   if(s[0] ==t[0])ans++;
      |                  ^~~
      |                  abs
a.cc:8:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if(s[1] ==t[1])ans++;
      |                  ^~~
      |                  abs
a.cc:9:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if(s[2] ==t[2])ans++;
      |                  ^~~
      |                  abs
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  stirng s,t;
  cin>>s>>t;
  int ans=0;
  for(int i=0;i<3;i++){
      if(s.at(i)==t.at(i)) ans++;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
    4 |   stirng s,t;
      |   ^~~~~~
a.cc:5:8: error: 's' was not declared in this scope
    5 |   cin>>s>>t;
      |        ^
a.cc:5:11: error: 't' was not declared in this scope; did you mean 'tm'?
    5 |   cin>>s>>t;
      |           ^
      |           tm
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string a,b;
  cin>>a>>b;
  int cnt=0
  for(int i=0;i<3;i++){
    if(a.at(i)!=b.at(i)){cnt++;}
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'for'
    7 |   for(int i=0;i<3;i++){
      |   ^~~
a.cc:7:15: error: 'i' was not declared in this scope
    7 |   for(int i=0;i<3;i++){
      |               ^
Language: Java

import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner scan = new.Scanner(System.in);
    String S = scan.next();
    String T = scan.next();
    char s[] = S.toCharArray;
    char t[] = T.toCharArray;
    for(i=0; i<3; i++){
      if(s[i] == t[i])
        ans++
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:4: error: <identifier> expected
    Scanner scan = new.Scanner(System.in);
                      ^
Main.java:11: error: ';' expected
        ans++
             ^
2 errors
Language: Java

    import java.util.Scanner;
    public class Main {
      public static void main(String[] args) {
        Scanner scan = new.Scanner(System.in);
        String S = scan.nextString();
        String T = scan.nextString();
        char s[] = S.toCharArray;
        char t[] = T.toCharArray;
        for(i=0; i<3; i++){
          if(s[i] == t[i])
            ans++
        }
        System.out.println(ans);
      }
    }

Compiler output:
Main.java:4: error: <identifier> expected
        Scanner scan = new.Scanner(System.in);
                          ^
Main.java:11: error: ';' expected
            ans++
                 ^
2 errors
Language: Java

import java.util.Scanner;
pubic class Main {
  public static void main(String[] args) {
    Scanner scan = new.Scanner(System.in);
    String S = scan.nextString();
    String T = scan.nextString();
    char s[] = S.toCharArray;
    char t[] = T.toCharArray;
    for(i=0; i<3; i++){
      if(s[i] == t[i])
        ans++
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
pubic class Main {
^
Main.java:4: error: <identifier> expected
    Scanner scan = new.Scanner(System.in);
                      ^
Main.java:11: error: ';' expected
        ans++
             ^
3 errors
Language: C++

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

int main() {
  string S, T;
  cin >> S >> T;
  
  int ans = 0;
  if (S[0] == T[0]) ans++;
  if (S[1] == T[1]) ans++;
  if (S[2] == T[2]) ans++;
  
  cout << ans << endl;
}

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

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

int main() {
  string S, T;
  cin >> S >> T;
  
  int count=0;
  for(i=0;i<2;i++){
    if(S.at(i)==T.at(i)){
      count++;
    }
  }
  cout<< count<<endl;
}


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


package atcoder139;
import java.util.Scanner;

public class AtCoder139 {

   
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String t = scanner.nextLine();
        scanner.close();
        int count = 0;
        for(int i = 0 ; i <s.length();i++){
        if(s.charAt(i) == t.charAt(i)){
        count++;
        }
        }
                     System.out.println(count);
    }
    
}


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


package atcoder139;
import java.util.Scanner;

public class AtCoder139 {

   
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String t = scanner.nextLine();
        int count = 0;
        for(int i = 0 ; i <s.length();i++){
        if(s.charAt(i) == t.charAt(i)){
        count++;
        }
        }
                     System.out.println(count);
    }
    
}


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


package atcoder139;
import java.util.Scanner;

public class AtCoder139 {

   
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String t = scanner.nextLine();
        int count = 0;
        for(int i = 0 ; i <=2;i++){
        if(s.charAt(i) == t.charAt(i)){
        count++;
        }
        }
                    
        System.out.println(count);
    }
    
}


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

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

int main(int argc, char **argv){
  if(argc = 0)
    fprintf(stderr, "no inputs\n");
  
  char pre[3];
  char real[3];
  char *p = argv[1];
  bool flag = false;
  int i = 0, count = 0;
  while(p >= argv[1]){
    if(p == '\n'){
      flag = true;
      i = 0;
      continue;
    }
    if(!(p == S || p == C || p == R)){
		fprintf(stderr, "invalid inputs");
    }
    
    if(!flag){
      pre[i] = p;
    }else{
      real[i] = p;
    }
    
    i++;
  }
   
  for(int j = 0; j < 3; j++){
    if(pre[j] == real[j])
      count++;
    else
      continue;
  }
  
  printf("%d\n", count);
}
  
  


Compiler output:
main.c: In function 'main':
main.c:12:3: error: unknown type name 'bool'
   12 |   bool flag = false;
      |   ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <string.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:12:15: error: 'false' undeclared (first use in this function)
   12 |   bool flag = false;
      |               ^~~~~
main.c:12:15: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:12:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:10: warning: comparison between pointer and integer
   15 |     if(p == '\n'){
      |          ^~
main.c:16:14: error: 'true' undeclared (first use in this function)
   16 |       flag = true;
      |              ^~~~
main.c:16:14: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:20:15: error: 'S' undeclared (first use in this function)
   20 |     if(!(p == S || p == C || p == R)){
      |               ^
main.c:20:25: error: 'C' undeclared (first use in this function)
   20 |     if(!(p == S || p == C || p == R)){
      |                         ^
main.c:20:35: error: 'R' undeclared (first use in this function)
   20 |     if(!(p == S || p == C || p == R)){
      |                                   ^
main.c:25:14: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   25 |       pre[i] = p;
      |              ^
main.c:27:15: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   27 |       real[i] = p;
      |               ^
Language: C

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

int main(int argc, char **argv){
  if(argc = 0)
    fprintf(stderr, "no inputs\n");
  
  char pre[3];
  char real[3];
  char *p = argv[1];
  bool flag = false;
  int i = 0, count = 0;
  while(p >= argv[1]){
    if(p == '\n'){
      flag = true;
      i = 0;
      continue;
    }
    if(!(p == S || p == C || p == R)){
		fprintf(stderr, "invalid inputs");
    }
    
    if(!flag){
      pre[i] = p;
    }else{
      real[i] = p;
    }
    
    i++;
  }
   
  for(int j = 0; j < 3; j++){
    if(pre[j] == real[j])
      count++;
    else
      continue;
  }
  
  printf("%d\n", count);
}
  
  

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

#include <bits/stdc++.h>
int main() {
  string S, T;
  cin >> S >> T;
  cout << (S[0] == T[0]) + (S[1] == T[1]) + (S[2] == T[2]) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string S, T;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> S >> T;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:10: error: 'S' was not declared in this scope
    4 |   cin >> S >> T;
      |          ^
a.cc:4:15: error: 'T' was not declared in this scope
    4 |   cin >> S >> T;
      |               ^
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (S[0] == T[0]) + (S[1] == T[1]) + (S[2] == T[2]) << 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:5:63: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << (S[0] == T[0]) + (S[1] == T[1]) + (S[2] == T[2]) << endl;
      |                                                               ^~~~
      |                                                               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  string s,t;
  cin >> s >> t;
  
  int count=0
    for(int i=0; i<s.size(); i++){
      if(s[i] == t[i]){
        count++;
        ]
      }
   cout << count << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(int i=0; i<s.size(); i++){
      |     ^~~
a.cc:9:18: error: 'i' was not declared in this scope
    9 |     for(int i=0; i<s.size(); i++){
      |                  ^
a.cc:15:6: error: expected '}' at end of input
   15 |     }
      |      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<stdio.h>
int main(void) {
	int t, n, m,k=100,kazu=1;
 
	scanf("%d%d", &n, &m);
	
		for (t = 0; t < k; t++) {
			if (kazu >= m) {
				printf("%d\n", t);
				break;
			}
			else {
				kazu = kazu - 1;
			}
			kazu = kazu + n;
			
		}
	
	return 0;
}
#include<stdio.h>
int main(void) {
	int t, n, m,k=100,kazu=1;

	scanf("%d%d", &n, &m);
	
		for (t = 0; t < k; t++) {
			if (kazu >= m) {
				printf("%d\n", t);
				break;
			}
			else {
				kazu = kazu - 1;
			}
			kazu = kazu + n;
			
		}
	
	return 0;
}

Compiler output:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main(void) {
      |     ^~~~
a.cc:2:5: note: 'int main()' previously defined here
    2 | int main(void) {
      |     ^~~~
Language: C++

#include<stdio.h>
int main(void) {
	int t, n, m,k=100,kazu=1;
 
	scanf("%d%d", &n, &m);
	
		for (t = 0; t < k; t++) {
			if (kazu >= m) {
				printf("%d\n", t);
				break;
			}
			else {
				kazu = kazu - 1;
			}
			kazu = kazu + n;
			
		}
	
	return 0;
}
#include<stdio.h>
int main(void) {
	int t, n, m,k=100,kazu=1;

	scanf("%d%d", &n, &m);
	
		for (t = 0; t < k; t++) {
			if (kazu >= m) {
				printf("%d\n", t);
				break;
			}
			else {
				kazu = kazu - 1;
			}
			kazu = kazu + n;
			
		}
	
	return 0;
}
提出情報
提出日時

Compiler output:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main(void) {
      |     ^~~~
a.cc:2:5: note: 'int main()' previously defined here
    2 | int main(void) {
      |     ^~~~
a.cc:41:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   41 | 提出情報
      | ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(i=1;i<=3;i++)
using namespace std;
string s,t;
int ans=0;
int main(){
  for(i=1;i<=3;i++){
    if(s[i]==t[i]){
      cout<<"0"<<endl;
    }
    else{
      ans+=;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=1;i<=3;i++){
      |       ^
a.cc:12:12: error: expected primary-expression before ';' token
   12 |       ans+=;
      |            ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s,t;
int ans=0;
int main(){
  for(i=1;i<=3;i++){
    if(s[i]==t[i]){
      cout<<"0"<<endl;
    }
    else{
      ans+=;
    }
  }
      

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=1;i<=3;i++){
      |       ^
a.cc:11:12: error: expected primary-expression before ';' token
   11 |       ans+=;
      |            ^
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s,t;
  cin >>s>>t;
  int ans;
  if(s[0] == t[0]) ans ++;
  if(s[1] == t[1]) ans ++;
  if(s[2] == t[2]) ans ++;
  cout << ans
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before '}' token
   11 |   cout << ans
      |              ^
      |              ;
......
   14 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s,t;
  cin >>s>>t;
  int ans
  if(s[0] == t[0]) ans ++;
  if(s[1] == t[1]) ans ++;
  if(s[2] == t[2]) ans ++;
  cout << ans
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'if'
    8 |   if(s[0] == t[0]) ans ++;
      |   ^~
a.cc:9:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if(s[1] == t[1]) ans ++;
      |                    ^~~
      |                    abs
a.cc:10:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if(s[2] == t[2]) ans ++;
      |                    ^~~
      |                    abs
a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   cout << ans
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
    cin>>s>>t;
  int a=0;
  for(i=0;i<3;i++)
  {
    if(s[i]==t[i])a=a+1;
  }
  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<3;i++)
      |       ^
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <numeric>
#include <cmath>

#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;

template<class T> inline bool chmin(T& a,T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a,T b) {if (a < b) {a = b; return true;} return false;}

const ll MOD = 1000000007;
const int INF = 1<<30;
//const ll INF = (ll)1e18 + 1;

int main(){
  string S, T;
  cin >> S;
  cin >> T;
  int ans = 0;
  rep(i, 3){
    if (S[i] == T[i]) ans++
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:28: error: expected ';' before '}' token
   31 |     if (S[i] == T[i]) ans++
      |                            ^
      |                            ;
   32 |   }
      |   ~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  sting a,b;
  cin >> a >> b;
  int res = 0;
  for(int i = 0;i < 3;i++){
    if(a[i] == b[i])res++;
  }
  cout << res << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'sting' was not declared in this scope
   14 |   sting a,b;
      |   ^~~~~
a.cc:15:10: error: 'a' was not declared in this scope
   15 |   cin >> a >> b;
      |          ^
a.cc:15:15: error: 'b' was not declared in this scope
   15 |   cin >> a >> b;
      |               ^
Language: C++

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

int main() {
  string S , T ;
  cin >> S >> T ;
  int sum = 0 ;
  for(int i = 0 ; i < 3 , i++){
    if(S[i]==T[i]){
      sum++ ;
    }
  }
cout << sum << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |   for(int i = 0 ; i < 3 , i++){
      |                              ^
      |                              ;
Language: C++

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

int main() {
   vector<string> N(3) , S(3) ;
   for(int i = 0 ; i < 3 ; i++){
     cin >> N.at(i) ;
   }
     for(int i = 0 ; i < 3 ; i++){
     cin >> S.at(i) ;
   }

  int sum = 0 ;
  for(int i = 0 ; i < 3 ; i++){
    if(N[i] == S[i]){
      sum += 1 ;
    }

    cout << sum << endl;
  }


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

#include<stdio.h>
using namespace std;
int main(){
	string a[3],b[3];
	for(int i=0;i<3;i++)
	cin>>a[i];
	for(int i=0;i<3;i++)
	cin>>b[i];
	int c=0;
	for(int i=0;i<3;i++){
		if(a[i]==b[i])
		c++;
	}
	cout<<c;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string a[3],b[3];
      |         ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<stdio.h>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a[i];
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:14: error: 'a' was not declared in this scope
    6 |         cin>>a[i];
      |              ^
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin>>b[i];
      |         ^~~
a.cc:8:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:14: error: 'b' was not declared in this scope
    8 |         cin>>b[i];
      |              ^
a.cc:11:20: error: 'a' was not declared in this scope
   11 |                 if(a[i]==b[i])
      |                    ^
a.cc:11:26: error: 'b' was not declared in this scope
   11 |                 if(a[i]==b[i])
      |                          ^
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<<c;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main() {
  string S, T;
  cin >> S >> T;
  char s1 = S.at(0);
  char s2 = S.at(1);
  char s3 = S.at(2);
  char t1 = T.at(0);
  char t2 = T.at(1);
  char t3 = T.at(2);
  cin >> s1 >> s2 >> s3 >> t1 >> t2 >> t3;
  if (s1 == t1 && s2 == t2 && s3 == t3) {
    cout << 3 << endl;
  }
  else if (s1 != t1 && s2 != t2 && s3 != t3) {
    cout << 0 << endl;
  }
  else if (s1 == t1 && s2 != && s3 != t3) {
     cout << 1 << endl;
  }
  else if (s1 != t1 && s2 == t2 && s3 != t3) {
    cout << 1 << endl;
  }
  else if (s1 != t1 && s2 != t2 && s3 == t3) {
    cout << 1 << endl;
  }
  else {
    cout << 2 << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |   else if (s1 == t1 && s2 != && s3 != t3) {
      |                        ~~~^~~~~~~~
a.cc:20:33: error: label 's3' used but not defined
   20 |   else if (s1 == t1 && s2 != && s3 != t3) {
      |                                 ^~
Language: C++

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

int main() {
  string S, T;
  cin >> S >> T;
  char s1 = S.at(0);
  char s2 = S.at(1);
  char s3 = S.at(2);
  char t1 = T.at(0);
  char t2 = T.at(1);
  char t3 = T.at(2);
  if (s1 == t1 && s2 == t2 && s3 == t3) {
    cout << 3 << endl;
  }
  else if (s1 != t1 && s2 != t2 && s3 != t3) {
    cout << 0 << endl;
  }
  else if (s1 == t1 && s2 != && s3 != t3) {
     cout << 1 << endl;
  }
  else if (s1 != t1 && s2 == t2 && s3 != t3) {
    cout << 1 << endl;
  }
  else if (s1 != t1 && s2 != t2 && s3 == t3) {
    cout << 1 << endl;
  }
  else {
    cout << 2 << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |   else if (s1 == t1 && s2 != && s3 != t3) {
      |                        ~~~^~~~~~~~
a.cc:19:33: error: label 's3' used but not defined
   19 |   else if (s1 == t1 && s2 != && s3 != t3) {
      |                                 ^~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          String caster = sc.next();
          String weather = sc.next();
          int count = 0;
          String[] caster = new caster.split("");
          String[] weather = new weather.split("");
          for(int i = 0; i < caster.length; i++) {
            if(caster[i].equals(weather[i])){
              count++;
            }
          }
          System.out.println(count);
        }
      }

Compiler output:
Main.java:9: error: variable caster is already defined in method main(String[])
          String[] caster = new caster.split("");
                   ^
Main.java:9: error: package caster does not exist
          String[] caster = new caster.split("");
                                      ^
Main.java:10: error: variable weather is already defined in method main(String[])
          String[] weather = new weather.split("");
                   ^
Main.java:10: error: package weather does not exist
          String[] weather = new weather.split("");
                                        ^
4 errors
Language: C++

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

int main() {
  String S;
  String T;
  cin >> S >> T;
  
  if (S[0] == T[0] && S[1] == T[1] && S[2] == T[2]) {
    cout << 3 << endl;
  } else if (S[0] == T[0] && S[1] == T[1] || S[1] == T[1] && S[2] == T[2] || S[0] == T[0] && S[2] == T[2]) {
    cout << 2 << endl;
  } else if (S[0] == T[0] || S[1] == T[1] || S[2] == T[2]) {
    cout << 1 << endl;
  } else {
    cout << 0 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String S;
      |   ^~~~~~
a.cc:6:9: error: expected ';' before 'T'
    6 |   String T;
      |         ^~
      |         ;
a.cc:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S >> T;
      |          ^
a.cc:7:15: error: 'T' was not declared in this scope
    7 |   cin >> S >> T;
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const int INF = 1000000000;
const int MOD = 1000000007;

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int main() {
  string s, t;
  cin >> s >> t;
  int ans  = 0;
  for(int i = 0; i < s.size(); ++i){
    if(s[i] == t[i]) ans++;
  }
  cou << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   19 |   cou << ans << endl;
      |   ^~~
      |   cos
Language: C++

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

int main(){
  string S,T;
  cin>>S>>T;
  int s=0;
  for(int i=0;i<S.size();i++){
    if(S.at(i)==T.at(i)){
      s++
    }
  }
  cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before '}' token
   10 |       s++
      |          ^
      |          ;
   11 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {

    #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {

    string S,T;
    cin >> S >> T;
    
    if (S[0] != T[0] && S[1] != T[1] && S[2] != T[2]) {
        cout << 0 << endl;
    }
    
    if (S[0] == T[0] && S[1] != T[1] && S[2] != T[2]) {
        cout << 1 << endl;
    }
    
    if (S[0] != T[0] && S[1] == T[1] && S[2] != T[2]) {
        cout << 1 << endl;
    }
    
    if (S[0] != T[0] && S[1] != T[1] && S[2] == T[2]) {
        cout << 1 << endl;
    }
    
    if (S[0] == T[0] && S[1] == T[1] && S[2] != T[2]) {
        cout << 2 << endl;
    }
    
    if (S[0] == T[0] && S[1] != T[1] && S[2] == T[2]) {
        cout << 2 << endl;
    }
    
    if (S[0] != T[0] && S[1] == T[1] && S[2] == T[2]) {
        cout << 2 << endl;
    }
    
    if (S[0] == T[0] && S[1] == T[1] && S[2] == T[2]) {
        cout << 3 << endl;
    }
    
}



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

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

int main(){
  int S,T,answer=0;
  cin>>S>>T;
  
  for(int i=0;i<3;i++){
    
    if(S.at(i)==T.at(i)){
      answer++;
    }
  }
  cout<<answer<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |     if(S.at(i)==T.at(i)){
      |          ^~
a.cc:10:19: error: request for member 'at' in 'T', which is of non-class type 'int'
   10 |     if(S.at(i)==T.at(i)){
      |                   ^~
Language: C++

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

int main(){
  int S,T,answer;
  cin>>S>>T;
  
  for(int i=0;i<3;i++){
    
    if(S.at(i)==T.at(i)){
      answer++;
    }
  }
  cout<<answer<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |     if(S.at(i)==T.at(i)){
      |          ^~
a.cc:10:19: error: request for member 'at' in 'T', which is of non-class type 'int'
   10 |     if(S.at(i)==T.at(i)){
      |                   ^~
Language: C++

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

int main(){
  int S,T,answer;
  cin>>S>>T;
  
  for(int i=0;i<3;i++){
    
    if(S.at(i)=T.at(i)){
      answer++;
    }
  }
  cout<<answer<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |     if(S.at(i)=T.at(i)){
      |          ^~
a.cc:10:18: error: request for member 'at' in 'T', which is of non-class type 'int'
   10 |     if(S.at(i)=T.at(i)){
      |                  ^~
Language: C++

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

int main(){
  int S,T;
  cin>>S>>T;
  
  for(int i=0;i<3;i++){
    int answer;
    if(S.at(i)=T.at(i)){
      answer++;
    }
  }
  cout<<answer<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |     if(S.at(i)=T.at(i)){
      |          ^~
a.cc:10:18: error: request for member 'at' in 'T', which is of non-class type 'int'
   10 |     if(S.at(i)=T.at(i)){
      |                  ^~
a.cc:14:9: error: 'answer' was not declared in this scope
   14 |   cout<<answer<<endl;
      |         ^~~~~~
Language: Java

import java.util.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    
    String a = sc.next();
    String b = sc.next();
    
    String a1 = a.substring(0,1):
    String a2 = a.substring(1,2):
    String a3 = a.substring(2,3):
    
    String b1 = b.substring(0,1):
    String b2 = b.substring(1,2):
    String b3 = b.substring(2,3):
    
    int count = 0;
    
    if(a1.equals(b1)){
      count++;
    }else if(a2.equals(b2)){
      count++;
    }else if(a3.equals(b3)){
      count++;
    }
    System.out.println(count);
  }
}
    

Compiler output:
Main.java:11: error: ';' expected
    String a1 = a.substring(0,1):
                                ^
Main.java:12: error: ';' expected
    String a2 = a.substring(1,2):
                                ^
Main.java:13: error: ';' expected
    String a3 = a.substring(2,3):
                                ^
Main.java:15: error: ';' expected
    String b1 = b.substring(0,1):
                                ^
Main.java:16: error: ';' expected
    String b2 = b.substring(1,2):
                                ^
Main.java:17: error: ';' expected
    String b3 = b.substring(2,3):
                                ^
6 errors
Language: C

#include<bits/stdc++.h>
using namespace std;
int main() {
string s,t;
int a,b;
cin>>s;
cin>>t;
a=0;
if(s[0]==t[0]){a++;}
if(s[1]==t[1]){a++;}
if(s[2]==t[2]){a++;}
cout<<a<<endl;
}

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

#include<stdio.h>
int main()
{
char a[3],b[3];
  int c;
get(a);
get(b);
  for(int j=0;j<3;j++)
  {
  if(a[j]==b[j]) c=c+1;
  }
  printf("%d",c);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'get'; did you mean 'getw'? [-Wimplicit-function-declaration]
    6 | get(a);
      | ^~~
      | getw
Language: Java

import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(final String[] args){
    
        String s = sc.next();
        char[] work = new char[s.length()];
        char[] work2 = new char[t.length()];
        int count = 0;

        for(int i = 0; i < s.length(); i++){
                work[i] = s.charAt(i);
            }

        for(int i = 0; i < t.length(); i++){
                work2[i] = t.charAt(i);
        }

        for(int i = 0; i < 2; i++){
            if(work[i] == work2[i]){
                count++;
            }
        }
        Sytem.out.println(count);

        

            
                


    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        String s = sc.next();
                   ^
  symbol:   variable sc
  location: class Main
Main.java:14: error: cannot find symbol
        char[] work2 = new char[t.length()];
                                ^
  symbol:   variable t
  location: class Main
Main.java:21: error: cannot find symbol
        for(int i = 0; i < t.length(); i++){
                           ^
  symbol:   variable t
  location: class Main
Main.java:22: error: cannot find symbol
                work2[i] = t.charAt(i);
                           ^
  symbol:   variable t
  location: class Main
Main.java:30: error: package Sytem does not exist
        Sytem.out.println(count);
             ^
5 errors
Language: C++

def resolve():
    s=list(input())
    t = list(input())
    ans=0
    for i in range(3):
        if s[i]==t[i]:
            ans+=1
    print(ans)
resolve()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def resolve():
      | ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, n) for(int i = 1; i <= n; i++)
#define ll long long
using namespace std;

int main() {
    sting s,t;
    cin>>s>>t;
    int cnt=0;
    rep(i,3){
        if(s[i]==t[i]) cnt++;
    }
    cout<<cnt<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'sting' was not declared in this scope
    8 |     sting s,t;
      |     ^~~~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |     cin>>s>>t;
      |          ^
a.cc:9:13: error: 't' was not declared in this scope; did you mean 'tm'?
    9 |     cin>>s>>t;
      |             ^
      |             tm
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, n) for(int i = 1; i <= n; i++)
#define ll long long
using namespace std;

int main() {
    sting s,t;
    cin>>s>>t;
    int cnt-0;
    rep(i,3){
        if(s[i]==t[i]) cnt++;
    }
    cout<<cnt<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'sting' was not declared in this scope
    8 |     sting s,t;
      |     ^~~~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |     cin>>s>>t;
      |          ^
a.cc:9:13: error: 't' was not declared in this scope; did you mean 'tm'?
    9 |     cin>>s>>t;
      |             ^
      |             tm
a.cc:10:12: error: expected initializer before '-' token
   10 |     int cnt-0;
      |            ^
a.cc:12:24: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |         if(s[i]==t[i]) cnt++;
      |                        ^~~
      |                        int
a.cc:14:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |     cout<<cnt<<endl;
      |           ^~~
      |           int
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s,t;
  cin>>s>>t;
  int cnt=0;
  rep(i,3){
   if( s[i]==t[i]) ++cnt;
  cout<<cnt<<endl;
}


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