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

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

int main(){
    int A,B;
    cin >> A >> B;
    if(B == )
    int need = (A+B-3)/(A-1);
    cout << need;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ')' token
    9 |     if(B == )
      |             ^
a.cc:11:13: error: 'need' was not declared in this scope
   11 |     cout << need;
      |             ^~~~
Language: C++

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

int main(){
    int A,B;
    cin >> A >> B;
    if(B == )
    need = (A+B-3)/(A-1);
    cout << need;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ')' token
    9 |     if(B == )
      |             ^
a.cc:10:5: error: 'need' was not declared in this scope
   10 |     need = (A+B-3)/(A-1);
      |     ^~~~
a.cc:11:13: error: 'need' was not declared in this scope
   11 |     cout << need;
      |             ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	string s,t;
    cin>>s>>t;
    itn 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:7:5: error: 'itn' was not declared in this scope; did you mean 'int'?
    7 |     itn sum=0;
      |     ^~~
      |     int
a.cc:10:9: error: 'sum' was not declared in this scope
   10 |         sum++;
      |         ^~~
a.cc:14:9: error: 'sum' was not declared in this scope
   14 |   cout<<sum<<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 ++;
    } else if(s[1] == t[1]) {
        ans ++;
    } else (s[2] == t[2]){
        ans ++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before '{' token
   14 |     } else (s[2] == t[2]){
      |                          ^
      |                          ;
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<3;i++){
		if(s[i]==s[t]) ans++;
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   10 |                 if(s[i]==s[t]) ans++;
      |                           ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:21: error: subscripted value is neither array nor pointer nor vector
    9 |                 if(s[i]!=s1[i])
      |                     ^
main.c:9:28: error: subscripted value is neither array nor pointer nor vector
    9 |                 if(s[i]!=s1[i])
      |                            ^
Language: C++

#include<iostream>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int ans = 0;
  for(int i = 0; i < s1.length(); i++) {
    if (s1[i] == s[2]) ans++;
  }
  cout << ans << endl;
  return 0;
}

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

#include<iostream>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int ans = 0;
  for(int i = 0; i < s1.length(); i++) {
    if (s1[i] == s[2]) ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 's' was not declared in this scope
    8 |     if (s1[i] == s[2]) ans++;
      |                  ^
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>3;i++){
        if(S.substr(i,1)==T.substr(i,1))
        ans++
    }
    cout << ans <<endl;
}


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

//inlclude前用define 
#define _USE_MATH_DEFINES

//include
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<type_traits>
#include<numeric>
//#include<deque>
#include<iomanip>
#include<set>
#include<tuple>
#include<map>

using namespace std;

//typedef
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<char> VC;
typedef long long int ll;

//define
#define INF 1e9 
#define NUM 1000000007
#define all(x) begin(x), end(x)
#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:37:33: error: expected ';' before 'cout'
   37 |    rep(i,3) if(s[i]==t[i]) cnt++
      |                                 ^
      |                                 ;
   38 | 
   39 |    cout<<cnt<<endl;
      |    ~~~~
Language: C++

//inlclude前用define 
#define _USE_MATH_DEFINES

//include
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<type_traits>
#include<numeric>
//#include<deque>
#include<iomanip>
#include<set>
#include<tuple>
#include<map>

using namespace std;

//typedef
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<char> VC;
typedef long long int ll;

//define
#define INF 1e9 
#define NUM 1000000007
#define all(x) begin(x), end(x)
#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:38:26: error: expected ';' before '}' token
   38 |      if(s[i]==t[i]) cnt++
      |                          ^
      |                          ;
   39 |    }
      |    ~
Language: C++

#include<iostream>
using namespace std;
int main(){

    string A, B;
    cin >> A >> B;
	int ans = 0;
	F0R(i, sz(A)) if (A[i] == B[i]) ans++;
	cout << ans << endl;



  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         F0R(i, sz(A)) if (A[i] == B[i]) ans++;
      |             ^
a.cc:8:16: error: 'sz' was not declared in this scope
    8 |         F0R(i, sz(A)) if (A[i] == B[i]) ans++;
      |                ^~
a.cc:8:9: error: 'F0R' was not declared in this scope
    8 |         F0R(i, sz(A)) if (A[i] == B[i]) ans++;
      |         ^~~
Language: Java

import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
 
public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    String ss=s.nextLine();
    String tt=s.nextLine();
    
    int c=0;
    for(int i=0;i<3;i++)
      if(ss.charAt(i)==tt.charAt(i))
        c++:
    
    System.out.println(c);
  }
}
    
    
  }
}

Compiler output:
Main.java:16: error: ';' expected
        c++:
           ^
Main.java:23: error: class, interface, enum, or record expected
  }
  ^
2 errors
Language: C++

#include <iostream>
 
using namespace std;
 
int main()
{
       string a="S""C""R";
       string b="S""C""R";
       cin>>a>>b;
       
       if(a=="C""S""S"&&b=="C""S""R")
       cout<<2;
       
      else if(a=="S""S""R"&&b=="S""S""R")
       cout<<3;
       else if(a=="R""R""R"&&b=="S""S""S")
       cout<<0;
       else 
       cout<<"erore";

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: expected '}' at end of input
   19 |        cout<<"erore";
      |                      ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s, t;
  cin>>s>>t;
  int total=0;
  for(int i=0; i<=3; ++i) {
    if(s[i]==t[i]) {
      total++;
    }
  }
  cout<<total<<'\n';
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s, t;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>s>>t;
      |   ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s>>t;
      |        ^
a.cc:6:11: error: 't' was not declared in this scope
    6 |   cin>>s>>t;
      |           ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<total<<'\n';
      |   ^~~~
Language: C++

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


void solve() {
  char S[3], T[3];
  scanf("%s\n", S);
  scanf("%s\n", T);
  int ans = 0;
  for (size_t i = 0; i < 2; i++) {
    if (S[i] == T[i]) {
      ans++
    }

  }


  cout << ans << "\n";
}

int main() {
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:12:12: error: expected ';' before '}' token
   12 |       ans++
      |            ^
      |            ;
   13 |     }
      |     ~
Language: C++

#include <iostream>

using namespace std;

int main()
{
       string a="S""C""R";
       string b="S""C""R";
       cin>>a>>b;
       
       if(a=="C""S""S"&&b=="C""S""R")
       cout<<2;
       
      else if(a=="S""S""R"&&b=="S""S""R")
       cout<<3;
       else if(a=="R""R""R"&&b=="S""S""S")
       cout<<0;
       else 
       cout<<"erore";

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: expected '}' at end of input
   19 |        cout<<"erore";
      |                      ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
       string a="S""C""R";
       string b="S""C""R";
       cin>>a>>b;
       
       if(a=="C""S""S"&&b=="C""S""R")
       cout<<2;
       
      else if(a=="S""S""R"&&b=="S""S""R")
       cout<<3;
       else if(a=="R""R""R"&&b=="S""S""S")
       cout<<0;

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected '}' at end of input
   17 |        cout<<0;
      |                ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
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 T = sc.next();
    
    oneS = S.substring(0,1);
    twoS = S.substring(1,2);
    threeS = S.substring(2,3);
    
    oneT = T.substring(0,1);
    twoT = T.substring(1,2);
    threeT = T.substring(2,3);
    
    int count = 0;
    if (oneS.equals(oneT)) {
      count ++;
    }
    if (twoS.equals(twoT)) {
      count ++;
    }
    if (threeS.equals(threeT)) {
      count ++;
    }
    
    System.out.println(count);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    oneS = S.substring(0,1);
    ^
  symbol:   variable oneS
  location: class Main
Main.java:10: error: cannot find symbol
    twoS = S.substring(1,2);
    ^
  symbol:   variable twoS
  location: class Main
Main.java:11: error: cannot find symbol
    threeS = S.substring(2,3);
    ^
  symbol:   variable threeS
  location: class Main
Main.java:13: error: cannot find symbol
    oneT = T.substring(0,1);
    ^
  symbol:   variable oneT
  location: class Main
Main.java:14: error: cannot find symbol
    twoT = T.substring(1,2);
    ^
  symbol:   variable twoT
  location: class Main
Main.java:15: error: cannot find symbol
    threeT = T.substring(2,3);
    ^
  symbol:   variable threeT
  location: class Main
Main.java:18: error: cannot find symbol
    if (oneS.equals(oneT)) {
                    ^
  symbol:   variable oneT
  location: class Main
Main.java:18: error: cannot find symbol
    if (oneS.equals(oneT)) {
        ^
  symbol:   variable oneS
  location: class Main
Main.java:21: error: cannot find symbol
    if (twoS.equals(twoT)) {
                    ^
  symbol:   variable twoT
  location: class Main
Main.java:21: error: cannot find symbol
    if (twoS.equals(twoT)) {
        ^
  symbol:   variable twoS
  location: class Main
Main.java:24: error: cannot find symbol
    if (threeS.equals(threeT)) {
                      ^
  symbol:   variable threeT
  location: class Main
Main.java:24: error: cannot find symbol
    if (threeS.equals(threeT)) {
        ^
  symbol:   variable threeS
  location: class Main
12 errors
Language: C++

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

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

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

#include<iostream>
#include<string>
using namespace std;
int main(){
  int x=0;
  string S,T;
  cin>>S>>T;
  if(S[0] == T[0])
    x++;
  if(S[1] == T[1])
    x++;
  if(S[2] == T[2])
    x++;
  cout<<x<<endl;

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

    #include<bits/stdc++.h>
    #define vll vector<ll>
    #define vi vector<int>
    #define vvi vector<vector<int>>
    #define vpll vector<pair<ll,ll>>
    #define pii pair<int,int>
    #define REP(i,a) for(int (i)=0; (i)<(a); (i)++)
    #define RREP(i,a) for(int (i)=a-1; (i)>=(0); (i)--)
    #define REP2(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
    #define MOD 1000000007
    #define INF 0x7FFFFFFF
    #define ALL(v) v.begin(), v.end()  
    #define m0(x) memset(x,0,sizeof(x))
    typedef long long ll;
     
    using namespace std;
     
    int main(){
        string S, T;
        intcin >> S >> T;
        int ans = 0;
        REP(i,3){
          if(S[i] == T[i]) ans++;
        }
        cout << ans << endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'intcin' was not declared in this scope
   20 |         intcin >> S >> T;
      |         ^~~~~~
Language: C++

include <iostream>
include <cmath>
include <cstring>
include <string>
using namespace std;
 
int main(){
  int ex = 0;
  string S, T;
  
  cin >> S >> T;
  
  for(int i = 0; i < 3; i++){
    if(S[i] == T[i]) ex++;
  }
  
  cout << ex << endl;
  
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'string' was not declared in this scope
    9 |   string S, T;
      |   ^~~~~~
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> S >> T;
      |   ^~~
a.cc:11:10: error: 'S' was not declared in this scope
   11 |   cin >> S >> T;
      |          ^
a.cc:11:15: error: 'T' was not declared in this scope
   11 |   cin >> S >> T;
      |               ^
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << ex << endl;
      |   ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope
   17 |   cout << ex << endl;
      |                 ^~~~
Language: C++

include<iostream>
include<cmath>
include<cstring>
include<string>
using namespace std;
 
int main(){
  int ex = 0;
  string S, T;
  
  cin >> S >> T;
  
  for(int i = 0; i < 3; i++){
    if(S[i] == T[i]) ex++;
  }
  
  cout << ex << endl;
  
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'string' was not declared in this scope
    9 |   string S, T;
      |   ^~~~~~
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> S >> T;
      |   ^~~
a.cc:11:10: error: 'S' was not declared in this scope
   11 |   cin >> S >> T;
      |          ^
a.cc:11:15: error: 'T' was not declared in this scope
   11 |   cin >> S >> T;
      |               ^
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << ex << endl;
      |   ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope
   17 |   cout << ex << endl;
      |                 ^~~~
Language: C++

include<iostream>
include<cmath>
include<cstring>
include<string>
using namespace std;
 
int main(){
  int ex = 0;
  string S, T;
  
  cin >> S;
  cin >> T;
  
  for(int i = 0; i < 3; i++){
    if(S[i] == T[i]) ex++;
  }
  
  cout << ex << endl;
  
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'string' was not declared in this scope
    9 |   string S, T;
      |   ^~~~~~
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> S;
      |   ^~~
a.cc:11:10: error: 'S' was not declared in this scope
   11 |   cin >> S;
      |          ^
a.cc:12:10: error: 'T' was not declared in this scope
   12 |   cin >> T;
      |          ^
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << ex << endl;
      |   ^~~~
a.cc:18:17: error: 'endl' was not declared in this scope
   18 |   cout << ex << endl;
      |                 ^~~~
Language: C++

include<iostream>
include<cmath>
using namespace std;
 
int main(){
  int ex = 0;
  char S[4];
  char T[4];
  
  for(int i = 0; i < 3; i++){
    cin >> S[i] >> T[i];
  }
  
  for(int i = 0; i < 3; i++){
    if(S[i] == T[i]) ex++;
  }
  
  cout << ex << endl;
  
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> S[i] >> T[i];
      |     ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << ex << endl;
      |   ^~~~
a.cc:18:17: error: 'endl' was not declared in this scope
   18 |   cout << ex << endl;
      |                 ^~~~
Language: C++

include<iostream>
include<cmath>
using namespace std;

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string S, T;
      |   ^~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> S;
      |   ^~~
a.cc:9:10: error: 'S' was not declared in this scope
    9 |   cin >> S;
      |          ^
a.cc:10:10: error: 'T' was not declared in this scope
   10 |   cin >> T;
      |          ^
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << ex << endl;
      |   ^~~~
a.cc:16:17: error: 'endl' was not declared in this scope
   16 |   cout << ex << endl;
      |                 ^~~~
Language: C++

#include<iostream>
#include<iomanip>
#include<cmath>
#include<cstring>
using namespace std;
 
int main(){
  string S;
  string T;
  int i = 0;
  
  cin >> S;
  cin >> T;
  
  if(strcmp(S, T) == 0) cout << 3 << endl;
  else if(S[0] == T[0]){
    if(S[1] == T[1]) cout << 2 << endl;
    else if(S[2] == T[2]) cout << 2 << endl;
    else cout << 1 << endl;
  }
  else if(S[0] != T[0]){
    if(S[1] == T[1]) {
      if(S[2] == T[2]) cout << 2 << endl;
      else cout << 1 << endl;
    }
    else if(S[1] != T[1]){
      if(S[2] == T[2]) cout << 1 << endl;
      else cout << 0 << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |   if(strcmp(S, T) == 0) cout << 3 << endl;
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:4:
/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)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'conut' was not declared in this scope; did you mean 'count'?
   11 |                         conut++;
      |                         ^~~~~
      |                         count
Language: C++

#Coding:Utf-8

S=input()
T=input()
ans=0

for i in range(3):
    if S[i]==T[i]:
        ans+=1

print(ans)


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Coding
    1 | #Coding:Utf-8
      |  ^~~~~~
a.cc:3:1: error: 'S' does not name a type
    3 | S=input()
      | ^
Language: Java

import java.util.*;

class Main{
  
  public static void main(String [] args)
  {
 		Scanner sc  = new Scanner(System.in);
    	String F =sc.nextLine();
    	String C =sc.nextLine();
    	int count=0;
    	for(int i=0;i<F.length();i++)
        {
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
          Character c2 = C.charAt(i);
          
          if(c1!=c2) count++;
        }
    
    System.out.println( count);
  }
  
}

Compiler output:
Main.java:13: error: ';' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                     ^
Main.java:13: error: ';' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                               ^
Main.java:13: error: not a statement
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                ^
Main.java:13: error: ';' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                    ^
Main.java:13: error: '(' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                        ^
Main.java:13: error: ';' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                                  ^
Main.java:13: error: ';' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                                           ^
Main.java:13: error: not a statement
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                                            ^
Main.java:13: error: ')' expected
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                                               ^
Main.java:13: error: variable declaration not allowed here
          Charact the number of days for which the forecast was correct.ter c1 = F.charAt(i);
                                                                            ^
10 errors
Language: C++

#include<stdio.h>
int main()
{
  char a[3]={0},b[3]={0};
  int n=0;
  scanf("%c",a);
  scanf("%c",b);
  for(i=0;i<3;i++)
  {
    if(a[i]=b[i])
      n++;
  }
  printf("%d\n",n);
  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++

#define _USE_MATH_DEFINES
#include <bits\stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define fore(i,a,b) for(int i = (int)a; i < (int)b; i++)
#define fr(i,a,b) for(int i = (int)a - 1; i >= (int)b; i--)
#define inf INT32_MAX
#define N 200005
#define mod 1000000000 + 7

using namespace std;

typedef long long ll;
typedef pair<int,int> pr;

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

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

#include <string>
#include <vector>

using namespace std;

int main() {
  std::string S;

  int match = 0;
  cin >> S;

  for (size_t i = 0; i < 3; i++) {
    char tmp;
    cin >> tmp;
    if (tmp == S[i])
      match++;
  }

  cout << match << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> S;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <vector>
  +++ |+#include <iostream>
    3 | 
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << match << endl;
      |   ^~~~
a.cc:19:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:20: error: 'endl' was not declared in this scope
   19 |   cout << match << endl;
      |                    ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <vector>
  +++ |+#include <ostream>
    3 |
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: no post-increment operator for type
   13 |                         count++;
      |                              ^~
Language: C++

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

int main() {
    string s;
    string t;
    cin >> s >>t:
    int cnt=0;
    for(int i=0;i<3;i++){
        char a = s.at(i);
        char b = t.at(i);
        if(a=b)cnt++;
    }
cout << cnt <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before ':' token
    7 |     cin >> s >>t:
      |                 ^
      |                 ;
a.cc:12:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |         if(a=b)cnt++;
      |                ^~~
      |                int
a.cc:14:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 | cout << cnt <<endl;
      |         ^~~
      |         int
Language: C++

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

int main() {
    string s;
    string t;
    int cnt=0;
    for(int i=0;i<n;i++){
        if(s.at(i)==t.at(i))cnt++;
    }
cout << cnt <<endl;
}


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

#include<iostream>
#include<string>
int main(){
  string s;
  string t;
  int cnt = 0;
  std::cin >> s >> t;
  for(int i = 0;i<3;i++){
    if(s[i] == t[i]) cnt ++;
  }
  std::cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:9: error: expected ';' before 't'
    5 |   string t;
      |         ^~
      |         ;
a.cc:7:15: error: 's' was not declared in this scope
    7 |   std::cin >> s >> t;
      |               ^
a.cc:7:20: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |   std::cin >> s >> t;
      |                    ^
      |                    tm
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextInt();
    String t=sc.nextInt();
    final char[] S=s.toCharArray();
    final char[] T=t.toCharArray();
    int counter=0;
    for(int i=0;i<3;i++){
      if(S[i]==T[i]){
        counter++;
      }
    }
    System.out.println(counter);
  }
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
    String s=sc.nextInt();
                       ^
Main.java:7: error: incompatible types: int cannot be converted to String
    String t=sc.nextInt();
                       ^
2 errors
Language: C

n=gets.chomp.to_s
m=gets.chomp.to_s
count=0
for i in 1..3
  if n[i]==m[i]
    count=count+1
  end
end
puts count

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=gets.chomp.to_s
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: 'gets' undeclared here (not in a function)
    1 | n=gets.chomp.to_s
      |   ^~~~
main.c:2:1: error: expected ',' or ';' before 'm'
    2 | m=gets.chomp.to_s
      | ^
main.c:4:10: error: too many decimal points in number
    4 | for i in 1..3
      |          ^~~~
Language: C

#include<stdio.h>
int main(void){
  char s[3],t[3];
  int a=0;
  scanf("%s%s",&s,&t);
  for(i=0;i<3;i++){
    if(s[i]==t[i]){
      a=a+1;
    }
  }
  printf("%d",a);
  return 0;
}
  

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

#include "bitss/stdc++.h"
using namespace std;
int main()
{
  long long int i,c=0;
  string s,s1;
  cin>>s;
  cin>>s1;
  for(i=0;i<s.size();i++)
  {
    if(s[i]==s1[i])c++;
  }
  cout<<c<<endl;
  return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: invalid types 'int[int]' for array subscript
   10 |     if(s[i]==t[i]){
      |         ^
a.cc:10:15: error: invalid types 'int[int]' for array subscript
   10 |     if(s[i]==t[i]){
      |               ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: invalid types 'int[int]' for array subscript
    9 |     if(s[i]==t[i]){
      |         ^
a.cc:9:15: error: invalid types 'int[int]' for array subscript
    9 |     if(s[i]==t[i]){
      |               ^
Language: C++

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

int main() {
	
	//vector<int> a(n);  sort(a.begin(),a.end());
	//c

	cin.tie(0);
	ios::sync_with_stdio(false);
	
	//string ans="YES";
	
	int ans=0;


	int n;
	cin >> n;
	
	vector<int> a(n);
	
	rep(i,n) cin >> a[i];
	
	int memo;
	
	rep(i,n-1){
		if(a[i+1]<=a[i]) {
			memo++;
			//cout << memo << endl;
		}
		
		else{
			ans=(memo,ans;)
			memo=0;
		}
	}
	
	
	
	
	cout << ans << "\n";
	
	
	return 0;

    }

Compiler output:
a.cc: In function 'int main()':
a.cc:34:38: error: expected ')' before ';' token
   34 |                         ans=(memo,ans;)
      |                             ~        ^
      |                                      )
a.cc:34:39: error: expected primary-expression before ')' token
   34 |                         ans=(memo,ans;)
      |                                       ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int s,t,count=0;
    cin >> s;
    cin >> t;

    for(int i=0;i<3;i++)
        if(s[i]==t[i])count++;
    cout << count << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: invalid types 'int[int]' for array subscript
   12 |         if(s[i]==t[i])count++;
      |             ^
a.cc:12:19: error: invalid types 'int[int]' for array subscript
   12 |         if(s[i]==t[i])count++;
      |                   ^
Language: C++

#include<iostream>
#include<string>

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

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

#include<iostream>
using namespace std;
int main(void){
  int a= 0;
  string s,t;
  cin >> s >> t;
  for(int i = 0;i < s.size()){
    if(s.at(i) == t.at(i)){
      a++;
    }
  }
      cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected ';' before ')' token
    7 |   for(int i = 0;i < s.size()){
      |                             ^
      |                             ;
Language: C++

#include<iostream>
using namespace std;
int main(void){
  int a= 0;
  string s,t;
  cin >> s >> t;
  for(int i = 0;i < s.size(){
    if(s.at(i) == t.at(i)){
      a++;
    }
  }
      cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected ';' before '{' token
    7 |   for(int i = 0;i < s.size(){
      |                             ^
      |                             ;
a.cc:7:29: error: expected primary-expression before '{' token
a.cc:7:29: error: expected ')' before '{' token
    7 |   for(int i = 0;i < s.size(){
      |      ~                      ^
      |                             )
Language: C

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


int main(void){
  char S[3];
  char T[3];
  scanf("%s", S);
  scanf("%s", T);

  int ans = 0;

  for (i = 0; i < 3; i++) {
    if (S[i] == T[i]) {
      ans++;
    }
  }
  printf("%d", ans);


}


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

import java.util.Scanner;

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

	}

}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S; cin >> S;
  string T; cin >> T;
  int cnt = 0;
  for(int i = 0; i < 3; i++){
    if(S[i] == T[i]) cnt++
  }
  cout << cnt << endl;
}

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

#include<iostream>
#include<cstring>
int main (void){
  char s[3],t[3];
  scanf("%s",&s);
  scanf("%s",&t);
  int ans=0;
  for(int i=0;i<=2;i++){
    if(s[i]==t[i]){ans++}
  }
  printf("%d",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before '}' token
    9 |     if(s[i]==t[i]){ans++}
      |                         ^
      |                         ;
Language: C++

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

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


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

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

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

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

#include <isotream>

using namespace std;

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

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextline();
		String T = scanner.nextline();
		int count = 0;
		if(S.substring(0,1).equals(T.substring(0,1))){
			count++;
		}if(S.substring(1,2).equals(T.substring(1,2))){
			count++;
		}if(S.substring(2,3).equals(T.substring(2,3))){
			count++;
		}
		System.out.println(count);
		}
	}


Compiler output:
Main.java:5: error: cannot find symbol
		String S = scanner.nextline();
		                  ^
  symbol:   method nextline()
  location: variable scanner of type Scanner
Main.java:6: error: cannot find symbol
		String T = scanner.nextline();
		                  ^
  symbol:   method nextline()
  location: variable scanner of type Scanner
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextline();
		String T = scanner.nextline();
		int count = 0;
		if(S.substring(0,1).equals(T.substring(0,1)){
			count++;
		}if(S.substring(1,2).equals(T.substring(1,2)){
			count++;
		}if(S.substring(2,3).equals(T.substring(2,3)){
			count++;
		}
		System.out.println(count);
		}
	}


Compiler output:
Main.java:8: error: ')' expected
		if(S.substring(0,1).equals(T.substring(0,1)){
		                                            ^
Main.java:10: error: ')' expected
		}if(S.substring(1,2).equals(T.substring(1,2)){
		                                             ^
Main.java:12: error: ')' expected
		}if(S.substring(2,3).equals(T.substring(2,3)){
		                                             ^
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextline();
		String T = scanner.nextline();
		int count = 0;
		if(S.substring(0,1).equals.(T.substring(0,1)){
			count++;
		}else if(S.substring(1,2).equals.(T.substring(1,2)){
			count++;
		}else if(S.substring(2,3).equals.(T.substring(2,3)){
			count++;
		}
		}
	}


Compiler output:
Main.java:8: error: <identifier> expected
		if(S.substring(0,1).equals.(T.substring(0,1)){
		                           ^
Main.java:8: error: ')' expected
		if(S.substring(0,1).equals.(T.substring(0,1)){
		                                             ^
Main.java:10: error: <identifier> expected
		}else if(S.substring(1,2).equals.(T.substring(1,2)){
		                                 ^
Main.java:10: error: ')' expected
		}else if(S.substring(1,2).equals.(T.substring(1,2)){
		                                                   ^
Main.java:12: error: <identifier> expected
		}else if(S.substring(2,3).equals.(T.substring(2,3)){
		                                 ^
Main.java:12: error: ')' expected
		}else if(S.substring(2,3).equals.(T.substring(2,3)){
		                                                   ^
6 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextline();
		String T = scanner.nextline();
		int count++;
		if(S.substring(0,1)equals.T.substring(0,1)){
			count++;
		}else if(S.substring(1,2)equals.T.substring(1,2)){
			count++;
		}else if(S.substring(2,3)equals.T.substring(2,3)){
			count++;
		}
		}
	}

Compiler output:
Main.java:7: error: ';' expected
		int count++;
		         ^
Main.java:8: error: ')' expected
		if(S.substring(0,1)equals.T.substring(0,1)){
		                   ^
Main.java:8: error: ';' expected
		if(S.substring(0,1)equals.T.substring(0,1)){
		                                          ^
Main.java:10: error: ')' expected
		}else if(S.substring(1,2)equals.T.substring(1,2)){
		                         ^
Main.java:10: error: ';' expected
		}else if(S.substring(1,2)equals.T.substring(1,2)){
		                                                ^
Main.java:10: error: 'else' without 'if'
		}else if(S.substring(1,2)equals.T.substring(1,2)){
		 ^
Main.java:12: error: ')' expected
		}else if(S.substring(2,3)equals.T.substring(2,3)){
		                         ^
Main.java:12: error: ';' expected
		}else if(S.substring(2,3)equals.T.substring(2,3)){
		                                                ^
Main.java:12: error: 'else' without 'if'
		}else if(S.substring(2,3)equals.T.substring(2,3)){
		 ^
9 errors
Language: Java

import java.util.Scanner;
class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        String T = scanner.nextLine();
        int count;
        if(S.substring(0,1)==T.substring(0,1)){
            count++;
        }
        if(S.substring(1,2)==T.substring(1,2)){
            count++;
        }
        if(S.substring(2,3)==T.substring(2,3)){
            count++;
        }
        System.out.println(count);
    }
}

Compiler output:
Main.java:9: error: variable count might not have been initialized
            count++;
            ^
Main.java:12: error: variable count might not have been initialized
            count++;
            ^
Main.java:15: error: variable count might not have been initialized
            count++;
            ^
Main.java:17: error: variable count might not have been initialized
        System.out.println(count);
                           ^
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
string a,b;
int h = 0;
int main(){
    cin >> a;
    cin >> b;
    for (int i=0; i<b.length;i++){
        if (a[i] == b[i]){
            h++;
        }
    }
    cout << h;
}

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