Language: C++

int main(){
    string s; cin >> s;
    int64_t cnt=0,l = s.size();
    for(int64_t idx=0;idx<l-4;idx++){
        string tmps =""; int64_t tmp=0;
        for(int64_t idx2=4;idx+idx2<=l;idx2++){
//            int64_t tmp = stoll(s.substr(idx,idx2));
            if(tmps == "") tmp = stoll(s.substr(idx,4));
            else tmp = tmp*10+ stoll(s.at(idx+idx2-1));
            
            if(tmp%2019 == 0) cnt++;
            tmp = tmp%2019;
            
        }
    }
    cout << cnt << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string s; cin >> s;
      |     ^~~~~~
a.cc:2:15: error: 'cin' was not declared in this scope
    2 |     string s; cin >> s;
      |               ^~~
a.cc:2:22: error: 's' was not declared in this scope
    2 |     string s; cin >> s;
      |                      ^
a.cc:3:5: error: 'int64_t' was not declared in this scope
    3 |     int64_t cnt=0,l = s.size();
      |     ^~~~~~~
a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | int main(){
a.cc:4:16: error: expected ';' before 'idx'
    4 |     for(int64_t idx=0;idx<l-4;idx++){
      |                ^~~~
      |                ;
a.cc:4:23: error: 'idx' was not declared in this scope
    4 |     for(int64_t idx=0;idx<l-4;idx++){
      |                       ^~~
a.cc:4:27: error: 'l' was not declared in this scope
    4 |     for(int64_t idx=0;idx<l-4;idx++){
      |                           ^
a.cc:5:15: error: expected ';' before 'tmps'
    5 |         string tmps =""; int64_t tmp=0;
      |               ^~~~~
      |               ;
a.cc:5:33: error: expected ';' before 'tmp'
    5 |         string tmps =""; int64_t tmp=0;
      |                                 ^~~~
      |                                 ;
a.cc:6:20: error: expected ';' before 'idx2'
    6 |         for(int64_t idx2=4;idx+idx2<=l;idx2++){
      |                    ^~~~~
      |                    ;
a.cc:6:32: error: 'idx2' was not declared in this scope
    6 |         for(int64_t idx2=4;idx+idx2<=l;idx2++){
      |                                ^~~~
a.cc:8:16: error: 'tmps' was not declared in this scope
    8 |             if(tmps == "") tmp = stoll(s.substr(idx,4));
      |                ^~~~
a.cc:8:28: error: 'tmp' was not declared in this scope
    8 |             if(tmps == "") tmp = stoll(s.substr(idx,4));
      |                            ^~~
a.cc:8:34: error: 'stoll' was not declared in this scope
    8 |             if(tmps == "") tmp = stoll(s.substr(idx,4));
      |                                  ^~~~~
a.cc:9:18: error: 'tmp' was not declared in this scope
    9 |             else tmp = tmp*10+ stoll(s.at(idx+idx2-1));
      |                  ^~~
a.cc:9:32: error: 'stoll' was not declared in this scope
    9 |             else tmp = tmp*10+ stoll(s.at(idx+idx2-1));
      |                                ^~~~~
a.cc:11:16: error: 'tmp' was not declared in this scope
   11 |             if(tmp%2019 == 0) cnt++;
      |                ^~~
a.cc:11:31: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |             if(tmp%2019 == 0) cnt++;
      |                               ^~~
      |                               int
a.cc:12:13: error: 'tmp' was not declared in this scope
   12 |             tmp = tmp%2019;
      |             ^~~
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << cnt << endl;
      |     ^~~~
a.cc:16:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |     cout << cnt << endl;
      |             ^~~
      |             int
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |     cout << cnt << endl;
      |                    ^~~~