Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;

namespace CSharp
{
    static class Program
    {
        static void Main(string[] args)
        {
            string s = ReadString(), t = ReadString();

            int ans = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == t[i])
                {
                    ans++;
                }
            }

            Console.WriteLine(ans);
        }

        #region Helpers

        static int[] ReadIntArray() => Console.ReadLine().Split().Select(s => int.Parse(s)).ToArray();
        static long[] ReadLongArray() => Console.ReadLine().Split().Select(s => long.Parse(s)).ToArray();

        static int[] ReadLineIntArray(int count) => Enumerable.Repeat(0, count).Select(_ => int.Parse(Console.ReadLine())).ToArray();
        static long[] ReadLineLongArray(int count) => Enumerable.Repeat(0, count).Select(_ => long.Parse(Console.ReadLine())).ToArray();

        static string ReadString() => Console.ReadLine();
        static int ReadInt() => int.Parse(Console.ReadLine());
        static long ReadLong() => long.Parse(Console.ReadLine());

        static void ReadInt(out int first)
        {
            var array = ReadIntArray();
            first = array[0];
        }

        static void ReadInt(out int first, out int second)
        {
            var array = ReadIntArray();
            first = array[0];
            second = array[1];
        }

        static void ReadInt(out int first, out int second, out int third)
        {
            var array = ReadIntArray();
            first = array[0];
            second = array[1];
            third = array[2];
        }

        static void ReadInt(out int first, out int second, out int third, out int fourth)
        {
            var array = ReadIntArray();
            first = array[0];
            second = array[1];
            third = array[2];
            fourth = array[3];
        }

        static void ReadLong(out long first)
        {
            var array = ReadLongArray();
            first = array[0];
        }

        static void ReadLong(out long first, out long second)
        {
            var array = ReadLongArray();
            first = array[0];
            second = array[1];
        }

        static void ReadLong(out long first, out long second, out long third)
        {
            var array = ReadLongArray();
            first = array[0];
            second = array[1];
            third = array[2];
        }

        static void ReadLong(out long first, out long second, out long third, out long fourth)
        {
            var array = ReadLongArray();
            first = array[0];
            second = array[1];
            third = array[2];
            fourth = array[3];
        }

        #endregion
    }
}

Compiler output:
a.cc:26:10: error: invalid preprocessing directive #region
   26 |         #region Helpers
      |          ^~~~~~
a.cc:98:10: error: invalid preprocessing directive #endregion
   98 |         #endregion
      |          ^~~~~~~~~
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'static'
    4 | using static System.Math;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:28:19: error: expected unqualified-id before '[' token
   28 |         static int[] ReadIntArray() => Console.ReadLine().Split().Select(s => int.Parse(s)).ToArray();
      |                   ^
a.cc:29:20: error: expected unqualified-id before '[' token
   29 |         static long[] ReadLongArray() => Console.ReadLine().Split().Select(s => long.Parse(s)).ToArray();
      |                    ^
a.cc:31:19: error: expected unqualified-id before '[' token
   31 |         static int[] ReadLineIntArray(int count) => Enumerable.Repeat(0, count).Select(_ => int.Parse(Console.ReadLine())).ToArray();
      |                   ^
a.cc:32:20: error: expected unqualified-id before '[' token
   32 |         static long[] ReadLineLongArray(int count) => Enumerable.Repeat(0, count).Select(_ => long.Parse(Console.ReadLine())).ToArray();
      |                    ^
a.cc:34:16: error: 'string' does not name a type
   34 |         static string ReadString() => Console.ReadLine();
      |                ^~~~~~
a.cc:35:33: error: invalid pure specifier (only '= 0' is allowed) before 'int'
   35 |         static int ReadInt() => int.Parse(Console.ReadLine());
      |                                 ^~~
a.cc:35:20: error: initializer specified for static member function 'static int CSharp::Program::ReadInt()'
   35 |         static int ReadInt() => int.Parse(Console.ReadLine());
      |                    ^~~~~~~
a.cc:36:35: error: invalid pure specifier (only '= 0' is allowed) before 'long'
   36 |         static long ReadLong() => long.Parse(Console.ReadLine());
      |                                   ^~~~
a.cc:36:21: error: initializer specified for static member function 'static long int CSharp::Program::ReadLong()'
   36 |         static long ReadLong() => long.Parse(Console.ReadLine());
      |                     ^~~~~~~~
a.cc:38:29: error: 'out' has not been declared
   38 |         static void ReadInt(out int first)
      |                             ^~~
a.cc:38:29: error: two or more data types in declaration of 'first'
a.cc:44:29: error: 'out' has not been declared
   44 |         static void ReadInt(out int first, out int second)
      |                             ^~~
a.cc:44:29: error: two or more data types in declaration of 'first'
a.cc:44:42: error: expected ')' before ',' token
   44 |         static void ReadInt(out int first, out int second)
      |                            ~             ^
      |                                          )
a.cc:44:21: error: 'static void CSharp::Program::ReadInt(...)' cannot be overloaded with 'static void CSharp::Program::ReadInt(...)'
   44 |         static void ReadInt(out int first, out int second)
      |                     ^~~~~~~
a.cc:38:21: note: previous declaration 'static void CSharp::Program::ReadInt(...)'
   38 |         static void ReadInt(out int first)
      |                     ^~~~~~~
a.cc:44:44: error: variable or field 'out' declared void
   44 |         static void ReadInt(out int first, out int second)
      |                                            ^~~
a.cc:44:44: error: expected ';' at end of member declaration
   44 |         static void ReadInt(out int first, out int second)
      |                                            ^~~
      |                                               ;
a.cc:44:52: error: expected ';' at end of member declaration
   44 |         static void ReadInt(out int first, out int second)
      |                                                    ^~~~~~
      |                                                          ;
a.cc:44:58: error: expected unqualified-id before ')' token
   44 |         static void ReadInt(out int first, out int second)
      |                                                          ^
a.cc:51:29: error: 'out' has not been declared
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                             ^~~
a.cc:51:29: error: two or more data types in declaration of 'first'
a.cc:51:42: error: expected ')' before ',' token
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                            ~             ^
      |                                          )
a.cc:51:21: error: 'static void CSharp::Program::ReadInt(...)' cannot be overloaded with 'static void CSharp::Program::ReadInt(...)'
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                     ^~~~~~~
a.cc:38:21: note: previous declaration 'static void CSharp::Program::ReadInt(...)'
   38 |         static void ReadInt(out int first)
      |                     ^~~~~~~
a.cc:51:44: error: variable or field 'out' declared void
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                            ^~~
a.cc:51:44: error: expected ';' at end of member declaration
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                            ^~~
      |                                               ;
a.cc:51:58: error: redeclaration of 'int CSharp::Program::second'
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                          ^
a.cc:44:52: note: previous declaration 'int CSharp::Program::second'
   44 |         static void ReadInt(out int first, out int second)
      |                                                    ^~~~~~
a.cc:51:60: error: expected ';' at end of member declaration
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                            ^~~
      |                                                               ;
a.cc:51:68: error: expected ';' at end of member declaration
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                                    ^~~~~
      |                                                                         ;
a.cc:51:73: error: expected unqualified-id before ')' token
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                                         ^
a.cc:59:29: error: 'out' is not a type
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                             ^~~
a.cc:59:29: error: two or more data types in declaration of 'first'
a.cc:59:42: error: expected ')' before ',' token
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                            ~             ^
      |                                          )
a.cc:59:21: error: 'static void CSharp::Program::ReadInt(...)' cannot be overloaded with 'static void CSharp::Program::ReadInt(...)'
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                     ^~~~~~~
a.cc:38:21: note: previous declaration 'static void CSharp::Program::ReadInt(...)'
   38 |         static void ReadInt(out int first)
      |                     ^~~~~~~
a.cc:59:44: error: variable or field 'out' declared void
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                                            ^~~
a.cc:59:44: error: expected ';' at end of member declaration
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                                            ^~~
      |                                               ;
a.cc:59:58: error: redeclaration of 'int CSharp::Program::second'
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                                                          ^
a.cc:44:52: note: previous declaration 'int CSharp::Program::second'
   44 |         static void ReadInt(out int first, out int second)
      |                                                    ^~~~~~
a.cc:59:60: error: expected ';' at end of member declaration
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                                                            ^~~
      |                                                               ;
a.cc:59:60: error: redeclaration of 'int CSharp::Program::out'
a.cc:51:60: note: previous declaration 'int CSharp::Program::out'
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                            ^~~
a.cc:59:73: error: redeclaration of 'int CSharp::Program::third'
   59 |         static void ReadInt(out int first, out int second, out int third, out int fourth)
      |                                                                         ^
a.cc:51:68: note: previous declaration 'int CSharp::Program::third'
   51 |         static void ReadInt(out int first, out int second, out int third)
      |                                                                    ^~~~~
a.cc:59:75: