Language: C

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Numerics;

namespace AtCoder.D
{
    public class Program
    {
        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var S = ReadText();

            // 明らか
            if (S.Length < 4) return 0L;

            var count = 0L;
            for (int i = 0; i < S.Length; i++)
            {
                for (int j = i; j < S.Length; j++)
                {
                    var s = S.Substring(i, j - i + 1);
                    var num = BigInteger.Parse(s);
                    if (num % 2019L == 0)
                    {
                        count++;
                    }
                }
            }
            return count;
        }

        #region Console.Read

        public static string ReadText() { return Console.ReadLine(); }
        public static List<string> ReadTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long ReadLong() { return long.Parse(Console.ReadLine()); }
        public static (long, long) Read2Longs() { var ls = ReadLongs(); return (ls[0], ls[1]); }
        public static (long, long, long) Read3Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2]); }
        public static (long, long, long, long) Read4Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3]); }
        public static (long, long, long, long, long) Read5Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3], ls[4]); }
        public static List<long> ReadLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }

        #endregion
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Collections.Generic;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Collections.Generic;
      |             ^
main.c:3:1: error: unknown type name 'using'
    3 | using System.Diagnostics;
      | ^~~~~
main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | using System.Diagnostics;
      |             ^
main.c:4:1: error: unknown type name 'using'
    4 | using System.Linq;
      | ^~~~~
main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | using System.Linq;
      |             ^
main.c:5:1: error: unknown type name 'using'
    5 | using System.Numerics;
      | ^~~~~
main.c:5:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | using System.Numerics;
      |             ^
main.c:7:1: error: unknown type name 'namespace'
    7 | namespace AtCoder.D
      | ^~~~~~~~~
main.c:7:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    7 | namespace AtCoder.D
      |                  ^
main.c:36:10: error: invalid preprocessing directive #region
   36 |         #region Console.Read
      |          ^~~~~~
main.c:47:10: error: invalid preprocessing directive #endregion
   47 |         #endregion
      |          ^~~~~~~~~