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

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

void n2019(ill i, ll &count, string S){
  for(ll j = i + 3; j < i + 8; j++){
    if(j >= S.size())
      return;
    ll x;
    istringstream(S.substr(i, j - i + 1)) >> x;
    if (x % 2019 == 0){
      count++;
      n2019(j + 1,count,S);
    }
  }
}

int main() {
  string S;
  cin >> S;
  ll count = 0;
  if (S.size() < 4){
    cout << 0 << endl;
    return 0;
  }
  for(ll i = 0; i < S.size() - 3; i++){
    n2019(i,count,S);
  }
    
  cout << count << endl;
}

Compiler output:
a.cc:5:6: error: variable or field 'n2019' declared void
    5 | void n2019(ill i, ll &count, string S){
      |      ^~~~~
a.cc:5:12: error: 'ill' was not declared in this scope; did you mean 'll'?
    5 | void n2019(ill i, ll &count, string S){
      |            ^~~
      |            ll
a.cc:5:22: error: expected primary-expression before '&' token
    5 | void n2019(ill i, ll &count, string S){
      |                      ^
a.cc:5:37: error: expected primary-expression before 'S'
    5 | void n2019(ill i, ll &count, string S){
      |                                     ^
a.cc: In function 'int main()':
a.cc:27:5: error: 'n2019' was not declared in this scope
   27 |     n2019(i,count,S);
      |     ^~~~~
Language: C++

#include <bits/stdc++.h>

int main()
{
    std::string S;
    std::cin >> S;
    
    int tuples = 0;
    int
    for(int i = 0; i < S.size(); i++) {
        int remained = std::stoi(S.substr(i,4));
        for(int j = i+5; j < S.size(); j++) {
            remained = remained * 10 + std::stoi(S.substr(j,1));
            remained %= 2019;
            if(remained == 0) {
                tuples++;
                break;
            }
        }
    }
    std::cout << tuples << std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int i = 0; i < S.size(); i++) {
      |     ^~~
a.cc:10:20: error: 'i' was not declared in this scope
   10 |     for(int i = 0; i < S.size(); i++) {
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long n,dp[200002][2020],len;
string s;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("test.inp","r",stdin);
    //freopen("test.out","w",stdout);
    cin>>s;
    len=s.length();
    dp[0][(s[0]-'0')%2019]++;
    
    for (int i=1;i<len;i++)
    {
        dp[i][(s[i]-'0')%2019]++;
        for (int j=0;j<2019;j++) 
        {
            dp[i][ ( j*10 + (s[i]-'0') ) % 2019 ]+=dp[i-1][j];
        }
    }
    int res=0;
    for (int i=0;i<len;i++) if (dp[i][0]>0) res+=dp[i][0];
    cout<<res;
    
}

Compiler output:
/tmp/ccSg35XY.o: in function `main':
a.cc:(.text+0x2a): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x43): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0xde): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x18c): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x25f): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x2c6): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccSg35XY.o
/tmp/ccSg35XY.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2f5): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
a.cc:(.text+0x30e): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccSg35XY.o
collect2: error: ld returned 1 exit status
Language: C

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long ll;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int cnt = 0, e = 0;
  int c[n] = { }, d[n] = { }, dec[n + 1] = { 1 };
  rep(i,n)
  {
    c[i] = s[i] - '0';
    d[i] = (c[i] + e * 10);
    if (d[i] >= 2019)
      d[i] %= 2019;
    e = d[i];
    dec[i + 1] = dec[i] * 10;
    if (dec[i + 1] >= 2019)
      dec[i + 1] %= 2019;
    if (d[i] == 0)
      cnt++;
  }
//  rep(i,n)
//    cout << d[i] << " ";
//  cout << endl;
//  rep(i,n+1)
//    cout << dec[i] << " ";
//  cout << endl;
  int a = 0;
  rep(i,n)
  {
//    cout << d[i] << ":";
    for (int j = 0; j <= i - 1; j++) {
      a = d[j] * dec[i - j];
      if (a >= 2019)
        a %= 2019;
      if (d[i] == a) {
        cnt++;

      }
//      cout << d[j] * dec[i - j] % 2019 << " ";
    }
//    cout << endl;
  }
  cout << cnt;
}


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()
{
  int a,b,c,d;
  int cou=0;
  int digit = 0;
  scanf("%d",&a);
  b=10;
  while(number!=0){
    number = number/10;
    digit++;
  }
  int i,j;
  if(a%2019==0){
    cou++;
  }
  for(i=3;i<digit;i++){
    c=1000;
    for(j=3;j<digit;j++){
      d=a%c;
      if(c%2019==0){
        cou++;
      }
      c=c*10;
    }
    a=a/b;
  }
  printf("%d",cou);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'number' undeclared (first use in this function)
    9 |   while(number!=0){
      |         ^~~~~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <numeric>
#include <random>
#include <bitset>
#include <chrono>

using namespace std;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

#ifndef ONLINE_JUDGE
// #include "debug.h"
#else
// #define debug(...) 42
#endif

const int M = 1e3+5;
const int MD= 1e9+7;

map<int,int>mp;
int main() {
	fast_cin();
	int t=1;
	// cin>>t;
	while(t--)
	{
		ll pro=1,sum=0,res=0;
		string s;
		cin>>s;
		int n=s.length();
		mp[0]++;
		for(int i=n-1;i>=0;i--){
			sum=(sum+pro*(s[i]-'0'))%2019;
			res+=mp[sum];
			mp[sum]++;
			pro=(pro*10)%2019;
		}
		cout<<res<<"\n";
	}
	return 0;
}

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

#include <bits/stdc++.h>
#include <stdio.h>
#include <string>
#define rep(i,n) for(int i=0; i <(n); i++)
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
using p = pair<int,int>;

bool is_2019mul(string s, int a, int b){
  string cutted = s.substr(a,b);
  if(atoi(cutted.c_str())%2019 == 0) return true;
  else return false;
}

int main(){
  string s;
  cin >> s;
  int ans = 0;
  for(int i=4; i <= s.size(); i++){
    rep(j,n-i+1){
      if( is_2019mul(s,j,i) )ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: 'n' was not declared in this scope
   21 |     rep(j,n-i+1){
      |           ^
a.cc:4:35: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0; i <(n); i++)
      |                                   ^
Language: C

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

int main(){
  string S;
  cin >> S;
  int count=0;
  for(int i=0;i<S.size();i++){
    for(int j=4;j<=S.size()-i;j++){
      int64_t num=stoll(S.substr(i,j));
      if(num%2019==0)
        count++;
    }
  }
    cout << count << endl;
}

Compiler output:
main.c: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;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, m,n) for (int i = m; i < (int)(n); i++)

int main(){
 int N; cin>>N; 
  vector<int>A;
  
  for(i,(N+10)/10=1,i++){A.at(i)=N&10; N=N/10;}
  reverse(A.begin(),A.end());
  
  
  rep(i,A.size()-1){ int S=A.at(i);
  Rep(k,i+1,A.size()){

    S=S*10+A.at(k);
    if(S%2019==0){ans++;}
  }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i,(N+10)/10=1,i++){A.at(i)=N&10; N=N/10;}
      |       ^
a.cc:10:15: error: lvalue required as left operand of assignment
   10 |   for(i,(N+10)/10=1,i++){A.at(i)=N&10; N=N/10;}
      |         ~~~~~~^~~
a.cc:11:10: error: could not convert 'std::reverse<__gnu_cxx::__normal_iterator<int*, vector<int> > >(A.std::vector<int>::begin(), A.std::vector<int>::end())' from 'void' to 'bool'
   11 |   reverse(A.begin(),A.end());
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~
      |          |
      |          void
a.cc:3:19: error: expected primary-expression before 'for'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                   ^~~
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i,A.size()-1){ int S=A.at(i);
      |   ^~~
a.cc:11:30: error: expected ')' before 'for'
   11 |   reverse(A.begin(),A.end());
      |                              ^
      |                              )
a.cc:10:6: note: to match this '('
   10 |   for(i,(N+10)/10=1,i++){A.at(i)=N&10; N=N/10;}
      |      ^
a.cc:18:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     if(S%2019==0){ans++;}
      |                   ^~~
      |                   abs
a.cc:21:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){string S;cin>>S;;int x=0;
           for(int i=0;i<(S.size()-3);i++)for(int j=4;j<(S.size()-i+1);j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
           cout<<x<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:118: error: expected ';' before 'x'
    4 |            for(int i=0;i<(S.size()-3);i++)for(int j=4;j<(S.size()-i+1);j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
      |                                                                                                                      ^
      |                                                                                                                      ;
a.cc:5:25: error: expected ')' before ';' token
    5 |            cout<<x<<endl;}
      |                         ^
      |                         )
a.cc:4:78: note: to match this '('
    4 |            for(int i=0;i<(S.size()-3);i++)for(int j=4;j<(S.size()-i+1);j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
      |                                                                              ^
Language: C

#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long

using namespace std;

int main() {
	string S;
	cin >> S;

	ll N = S.size();
	ll MOD = 2019;
	ll ans = 0;
	for (int ii = N-1; ii > 0; --ii){
		ll val = S[ii] - '0';
		ll rem = val % MOD;
		ll base = 10;
		for (int jj = ii - 1; jj >= 0; --jj){
			ll v = (S[jj] - '0') * base;
			rem = (rem + v % MOD) % MOD;
			if (rem == 0) {
				ans++;
				break;
			}
			base = (base * 10) % MOD;
		}
	}

	cout << ans << "\n";


	return 0;
}


Compiler output:
main.c: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;
long long res=0,n,dp[200002][2020],len;
string s;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("test.inp","r",stdin);
    //freopen("test.out","w",stdout);
    cin>>s;
    len=s.length();
    dp[0][(s[0]-'0')%2019]++;
    
    for (int i=1;i<len;i++)
    {
        dp[i][(s[i]-'0')%2019]++;
        for (int j=0;j<2019;j++) 
        {
            dp[i][ ( j*10 + (s[i]-'0') ) % 2019 ]+=dp[i-1][j];
        }
    }
    for (int i=0;i<len;i++) if (dp[i][0]>0) res+=dp[i][0];
    cout<<res;
    
}

Compiler output:
/tmp/ccy64X07.o: in function `main':
a.cc:(.text+0x2a): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x43): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0xde): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x18c): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x25f): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x2c6): relocation truncated to fit: R_X86_64_PC32 against symbol `len' defined in .bss section in /tmp/ccy64X07.o
/tmp/ccy64X07.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2fa): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
a.cc:(.text+0x313): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccy64X07.o
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
int main()
{
  int a,b,c,d;
  int cou=0;
  int digit = 0;
  scanf("%d",&a);
  b=10;
  while(number!=0){
    number = number/10;
    digit++;
  }
  int i,j;
  if(a%2019=0){
    cou++;
  }
  for(i=3;i<digit;i++){
    c=1000;
    for(j=3;j<digit;j++){
      d=a%c;
      if(c%2019=0){
        cou++;
      }
      c=c*10;
    }
    a=a/b;
  }
  printf("%d",cou);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'number' undeclared (first use in this function)
    9 |   while(number!=0){
      |         ^~~~~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:12: error: lvalue required as left operand of assignment
   14 |   if(a%2019=0){
      |            ^
main.c:21:16: error: lvalue required as left operand of assignment
   21 |       if(c%2019=0){
      |                ^
Language: C

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

int main(){
 int N; cin>>N; 
  vector<int>A;
  
  for(i,(N+10)/10=1,i++){A.at(i)=N&10; N=N/10;}
  reverse(A.begin(),A.end());
  
  
  rep(i,A.size()-1){ int S=A.at(i);
  Rep(k,i+1,A.size()){

    S=S*10+A.at(k);
    if(S%2019==0){ans++;}
  }
  }
  cout<<ans<<endl;
}

Compiler output:
main.c: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;cin>>S;;int x=0;
           for(int i=0;i<S.size()-3;i++)for(int j=4;j<S.size()-i+1;j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
           cout<<x<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:114: error: expected ';' before 'x'
    4 |            for(int i=0;i<S.size()-3;i++)for(int j=4;j<S.size()-i+1;j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
      |                                                                                                                  ^
      |                                                                                                                  ;
a.cc:5:25: error: expected ')' before ';' token
    5 |            cout<<x<<endl;}
      |                         ^
      |                         )
a.cc:4:74: note: to match this '('
    4 |            for(int i=0;i<S.size()-3;i++)for(int j=4;j<S.size()-i+1;j++)if(!((atoi((S.substr(i,j).c_str()))%2019))x++;
      |                                                                          ^
Language: C++

using namespace std;

int main(){
    long S;
    cin >> S;
    S = abs(S);
    string S_str;
    S_str = to_string(S);
    int num = S_str.size();
    int ctr = 0;
    for(int i = 0;i < num -1; i++){
        for(int j = i+1; j < num; j++){
            string val_str = S_str.substr(i, j-i+1);
            long val_int;
            val_int = stol(val_str);
            if(val_int % (long)2019 == 0){
                ctr += 1;
            }
        }
    }
    cout << ctr << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> S;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:9: error: 'abs' was not declared in this scope
    6 |     S = abs(S);
      |         ^~~
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string S_str;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:8:5: error: 'S_str' was not declared in this scope
    8 |     S_str = to_string(S);
      |     ^~~~~
a.cc:8:13: error: 'to_string' was not declared in this scope
    8 |     S_str = to_string(S);
      |             ^~~~~~~~~
a.cc:8:13: note: 'std::to_string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:13:19: error: expected ';' before 'val_str'
   13 |             string val_str = S_str.substr(i, j-i+1);
      |                   ^~~~~~~~
      |                   ;
a.cc:15:28: error: 'val_str' was not declared in this scope
   15 |             val_int = stol(val_str);
      |                            ^~~~~~~
a.cc:15:23: error: 'stol' was not declared in this scope
   15 |             val_int = stol(val_str);
      |                       ^~~~
a.cc:15:23: note: 'std::stol' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << ctr << endl;
      |     ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:20: error: 'endl' was not declared in this scope
   21 |     cout << ctr << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C

s = input()
n = len(s)

def make_z_list(s):
    n = len(s)

    z_list = [0] * n
    z_list[0] = n
    
    i = 1
    j = 0
    
    while i < n:
        while i + j < n and s[j] == s[i + j]:
            j += 1
    
        z_list[i] = j
        
        if j == 0:
            i += 1
            continue
    
        k = 1
        while i + k < n and k + z_list[k] < j:
            z_list[i + k] = z_list[k]
            k += 1
    
        i += k
        j -= k
    
    return z_list

ans = 0
for i in range(n):
    z_list = make_z_list(s[i:])
    for z in z_list:
        # print(s[i:i+z])
        if z >= 4 and int(s[i:i+z]) % 2019 == 0:
            ans += 1
print(ans)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | s = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | s = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'n'
    2 | n = len(s)
      | ^
main.c:37:11: error: invalid preprocessing directive #print
   37 |         # print(s[i:i+z])
      |           ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <ctime>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <stdio.h>
using namespace std;

int main(){
    string S;
    cin >> S;

    int ans = 0;
    for(int j = 0; j < S.size(); j++){
        int check = 0;
        int partnum = 0;

        for(int i = j; i < S.size(); i++){
            int kari = stoi(S[i]);
            check += kari;
            cout << check << endl;
            partnum = partnum*10;
            partnum += kari;
            if(check % 3 == 0){
                if(partnum % 673 == 0){
                    ans++;
                }
            }


        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   21 |             int kari = stoi(S[i]);
      |                        ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/**
 *
 * @author Milo
 */
public class Main {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
    static FastReader in = new FastReader();
    public static void main(String[] args) {
        int t = 1; //in.nextInt();
        while (t-- > 0)
            solve();
    }
 
    public static void solve() {
     
      String s = in.next();
        int l = s.length();
        BigInteger bi;
        BigInteger mm = new BigInteger("2019");
        BigInteger z = BigInteger.ZERO;
                
        int ans = 0;
        for (int i = 4; i <= l; i++) {
            for(int j = 0; j < l - i + 1; j++){
                bi = new BigInteger(s.substring(j, j + i));
                System.out.println(bi);
                if(bi.mod(mm).equals(z)){
                    ++ans;
                }
            }
        }
        System.out.println(ans);
       
    }
 
    public static int max(int a, int b) {
        return a > b ? a : b;
    }
 
    public static int min(int a, int b) {
        return a < b ? a : b;
    }
 
    public static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, (a % b));
    }
}


Compiler output:
Main.java:63: error: cannot find symbol
        BigInteger bi;
        ^
  symbol:   class BigInteger
  location: class Main
Main.java:64: error: cannot find symbol
        BigInteger mm = new BigInteger("2019");
        ^
  symbol:   class BigInteger
  location: class Main
Main.java:64: error: cannot find symbol
        BigInteger mm = new BigInteger("2019");
                            ^
  symbol:   class BigInteger
  location: class Main
Main.java:65: error: cannot find symbol
        BigInteger z = BigInteger.ZERO;
        ^
  symbol:   class BigInteger
  location: class Main
Main.java:65: error: cannot find symbol
        BigInteger z = BigInteger.ZERO;
                       ^
  symbol:   variable BigInteger
  location: class Main
Main.java:70: error: cannot find symbol
                bi = new BigInteger(s.substring(j, j + i));
                         ^
  symbol:   class BigInteger
  location: class Main
6 errors
Language: C++

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

void solver() {
  string s;
  cin >> s;

  long long ans = 0;
  for (long long i = 0; i < s.size(); i++) {
    long long res = 0;
    bool zeros = true;
    for (long long j = i; j < s.size(); j++) {
      res = (res * 10) + (s[j]-48);
      if (s[j]-48 != 0) zeros = false;
      res = res % 2019;
      if (res == 0 && !first) {
        ans++;
        break;
      }
    }
  }

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

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


Compiler output:
a.cc: In function 'void solver()':
a.cc:16:24: error: 'first' was not declared in this scope
   16 |       if (res == 0 && !first) {
      |                        ^~~~~
Language: Java


import java.util.Scanner;

public class Test{
    public static void main(String[] args){
        int num = 0;
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        char[] c = a.toCharArray();
        String b ="";
        for (int i = 0;i<a.length();i++){
            b+= c[i];
            int y = Integer.valueOf(b);
            if (y % 2019 == 0){
                num++;
                b = "";
                i--;
            }
        }
        System.out.println(num);
    }
}

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

til.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String sStr = sc.next();
//        String sStr = "1817181712114";


        int[] sArray = new int[sStr.length()];
        for (int i = 0; i < sArray.length; i++) {
            sArray[i] = Integer.parseInt(sStr.substring(i, i + 1));
        }

        int answer = 0;
        for (int i = 1; i <= sStr.length() - 3; i++) {
            for (int j = i + 1; j <= sStr.length(); j++) {
                int digits = j - i + 1;
                int target = 0;
                int count = 0;
                for (int k = digits - 1; k >= 0; k--) {
                    target += sArray[i + count - 1] * (int) Math.pow(10, k);
                    count++;
                }
                if (target % 2019 == 0) {
                    answer++;
                }
            }
        }


        System.out.println(answer);

    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
til.Scanner;
^
1 error
Language: C++


	mp[0]++;
	int len = s.size();
	int base = 1;
	int now = 0;
	
	ll ans = 0;
	for(int i = len-1;i >= 0;--i){
		(now += base%M*(s[i]-'0')%M) %= M;
		ans += mp[now];
		mp[now]++;
		(base *= 10%M) %= M;
	}
	
	printf("%lld\n",ans);
    return 0;
}

Compiler output:
a.cc:2:9: error: 'mp' does not name a type
    2 |         mp[0]++;
      |         ^~
a.cc:3:19: error: 's' was not declared in this scope
    3 |         int len = s.size();
      |                   ^
a.cc:7:9: error: 'll' does not name a type
    7 |         ll ans = 0;
      |         ^~
a.cc:8:9: error: expected unqualified-id before 'for'
    8 |         for(int i = len-1;i >= 0;--i){
      |         ^~~
a.cc:8:27: error: 'i' does not name a type
    8 |         for(int i = len-1;i >= 0;--i){
      |                           ^
a.cc:8:34: error: expected unqualified-id before '--' token
    8 |         for(int i = len-1;i >= 0;--i){
      |                                  ^~
a.cc:15:15: error: expected constructor, destructor, or type conversion before '(' token
   15 |         printf("%lld\n",ans);
      |               ^
a.cc:16:5: error: expected unqualified-id before 'return'
   16 |     return 0;
      |     ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C

import java.util.Scanner;

/**
 * @author Orange Summer
 * @date 2020/4/26-20:44
 */
public class EL {
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        String x=in.nextLine();
        int sum=0;
        for (int j=0;(j+4)<x.length();j++) {
            for (int i = 3; i < x.length(); i++) {
                if (i<(j+3)){
                    i=j+3;
                    if(i>=x.length()){
                        i=x.length()-1;
                    }
                }
                long y = Long.parseLong(x.substring(j,i+1));
                if (y % 2019 == 0) {
                    sum++;
                }
            }
        }
        System.out.println(sum);
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:7:1: error: unknown type name 'public'
    7 | public class EL {
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EL'
    7 | public class EL {
      |              ^~
Language: C

#include <bits/stdc++.h>

#define REP(i, s, n) for (int i = s; i < n; i++)
#define ALL(a) a.begin(), a.end()
#define MOD 1000000007
using namespace std;
typedef long long ll;

int main() {
    // int N, P; string S; cin >> N >> P >> S;
    string S;
    cin >> S;
    int N = S.length();
    int P = 2019;
    ll ans = 0;
    if (P == 2 || P == 5) {
        REP(i, 0, N)
            if ((S[N - i - 1] - '0') % P == 0)
                ans += N - i;
    }
    else {
        vector<ll> mods(P, 0);

        ll cur = 0, coef = 1;
        mods[cur]++;
        REP(i, 0, N) {
            cur = (cur + coef * (S[N - i - 1] - '0') % P) % P;
            coef = coef * 10 % P;
            mods[cur]++;
        }

        REP(i, 0, P) {
            ans += mods[i] * (mods[i] - 1) / 2;
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
main.c: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;
long long res=0,n,dp[200002][2020];
string s;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("test.inp","r",stdin);
    //freopen("test.out","w",stdout);
    cin>>s;
    memset(dp,sizeof(dp),0);
    dp[0][(s[0]-'0')%2019]++;
    
    for (int i=1;i<s.length();i++)
    {
        dp[i][(s[i]-'0')%2019]++;
        for (int j=0;j<2019;j++) 
        {
            dp[i][ ( j*10 + (s[i]-'0') ) % 2019 ]+=dp[i-1][j];
        }
    }
    for (int i=0;i<s.length();i++) if (dp[i][0]>0) res+=dp[i][0];
    cout<<res;
    
}

Compiler output:
/tmp/ccrCUEO0.o: in function `main':
a.cc:(.text+0x2a): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0x48): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0x176): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0x249): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0x2bd): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
/tmp/ccrCUEO0.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2fe): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
a.cc:(.text+0x317): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccrCUEO0.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int sum = 0;
  int slen = s.size()
  for(int i= 0; i < slen-1; i++){
    for(int j = 1; j < slen-i+1; j++){
      string sub = s.substr(i,j); 
      if(stoll(sub)%2019==0) {
        sum++;
      }
    }
  }
  
  cout << sum << endl;
}
  

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

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

void solve()
{
    string s;
    cin >> s;
    int c = 0;
    for (int i = 0; i < s.size() - 4; i++)
    {
        for (int j = i + 3; j < s.size(); j++)
        {
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
            if (x % (unsigned long long)2019 == 0)
                c++;
            if (j - i > 20)
                break;
        }
    }
    cout << c;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:7: error: not a statement
    cin >> s;
        ^
Main.java:13: error: not a statement
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
            ^
Main.java:13: error: not a statement
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                     ^
Main.java:14: error: not a statement
            if (x % (unsigned long long)2019 == 0)
                                   ^
Main.java:20: error: not a statement
    cout << c;
         ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
void solve()
^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: ';' expected
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                    ^
Main.java:13: error: ';' expected
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                         ^
Main.java:14: error: ')' expected
            if (x % (unsigned long long)2019 == 0)
                             ^
Main.java:14: error: ';' expected
            if (x % (unsigned long long)2019 == 0)
                                       ^
Main.java:24: error: not a statement
    ios_base::sync_with_stdio(0);
    ^
Main.java:24: error: ';' expected
    ios_base::sync_with_stdio(0);
                             ^
14 errors
Language: Java

import java.io.*;

public class Battle {
    public static void main(String[] args) {
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            char[] n = in.readLine().toCharArray();
            int count = 0;
            for (int i = n.length - 1;i >= 3;i --) {
                for (int j = i - 3;j >= 0 && j >= i - 6;j --) {
                    int factor = 1;
                    int t = 0;
                    for (int k = i;k >= j;k --) {
                        t += factor * Integer.parseInt(n[k] + "");
                        factor *= 10;
                    }
                    if (t % 2019 == 0) {
                        count ++;
                    }
                }
            }
            System.out.print(count);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}


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

// #include <bits/stdc++.h>
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<set>
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
const int MOD = 1e9 + 7; // 10^9 + 7
using namespace std;

// ------------------ コンビネーション関数 ------------------ //
// ---------------- 使用前「COMinit();」必須 ---------------- //
const int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}
long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

// ------------------ 最大公約数関数 ------------------ //
int GCD(int x, int y) {
	if (x == 0) return y;
	else GCD(y % x, x);
}

// ------------------ ベクター表示 ------------------ //
void printVec(vector<int>& vec) {
	cout << "";
	for (auto it = vec.begin(); it != vec.end(); it++) cout << *it << " ";
	cout << endl;
}

// ------------------ ベクター合計 ------------------ //
int sumVec(vector<int> v) {
	int sum = 0;
	for (size_t i = 0; i < v.size(); i++) sum += v[i];
	return sum;
}


// ------------------------------------------------ //
// ------------------ ここから下 ------------------ //
// ------------------------------------------------ //

int main(void) {

	string S;
	cin >> S;

	if (S.size() < 5) {
		cout << 0 << endl;
		return 0;
	}
	else {
		// 2019の倍数表作成

		vector<ll> tmp;
		ll Slong = atol(S.c_str());
		ll endnum = 0, num = 0, ans = 0;

		while (Slong > endnum) {
			tmp[num] = 2016 * num;
			num++;
			endnum = tmp[num];
		}

		//

		for (ll i = 0; i <= num; i++) {
			ll tmpSize = tmp[i].size();
			ll pos = S.find(tmp[i]);
			while (pos != string::npos) {
				ans++;
			}
		}

		cout << ans << endl;

		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:45: error: request for member 'size' in 'tmp.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   83 |                         ll tmpSize = tmp[i].size();
      |                                             ^~~~
a.cc: In function 'int GCD(int, int)':
a.cc:36:17: warning: control reaches end of non-void function [-Wreturn-type]
   36 |         else GCD(y % x, x);
      |              ~~~^~~~~~~~~~
Language: C++

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

int memoize[200001][673];
int sum[200001]={0};

int solve(int i, int m, string s,int start)
{
    if (i == s.size()) return 0;
    if (memoize[i][m] != -1) return memoize[i][m];
    int x = s[i] - '0',f;
    if(start==0) f=sum[i];
    else f=sum[i]-sum[start-1];
    int ans = ((x+10*m)%673 == 0 && f%3==0) + solve(i+1, (10*m+x)%673, s,start);
    return memoize[i][m] = ans;
}

int countDivBy6(string s)
{
    int n = s.size();
    for(int i=0; i<=n; i++)
        for(int j=0; j<673; j++)
            memoize[i][j]=-1;
    int ans = 0;
    for (int i = 0; i < n; i++)
        ans += solve(i, 0, s, i);
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin>>s;
    int n=s.size();
    sum[0]=s[0]-'0';
    for(int i=1; i<n; i++)
        sum[i]=sum[i-1]+s[i]-'0';
    cout<<countDivBy6(s)<<"\n;
    return 0;
}


Compiler output:
a.cc:40:27: warning: missing terminating " character
   40 |     cout<<countDivBy6(s)<<"\n;
      |                           ^
a.cc:40:27: error: missing terminating " character
   40 |     cout<<countDivBy6(s)<<"\n;
      |                           ^~~~
a.cc: In function 'int main()':
a.cc:41:5: error: expected primary-expression before 'return'
   41 |     return 0;
      |     ^~~~~~
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <cmath>
#include <numeric>
#include <iomanip>
#include <deque>
#include <tuple>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <sstream>
#include <stdexcept>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>

#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define FOR(i, a, done) for (int i = (a); i < (done); ++i)
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define debug(a) cout << (a) << endl
namespace mp = boost::multiprecision;
using cpp_int = mp::cpp_int;
using ll = long long;
using namespace std;
template <class T>
bool chmax(T &a, const T &b)
{
	if (a < b)
	{
		a = b;
		return 1;
	}
	return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
	if (a > b)
	{
		a = b;
		return 1;
	}
	return 0;
}

ll M = 1000000007;
bool isMultiple (string s, int base, int m) {
	ll temp = 0;
	for (int i=0; i<s.length(); i++) {
		temp = (temp*base+s[i]-'0')%m;
	}
	if (temp==0) {return true;}
	return false;
}
void solve()
{
	string s;
	cin>>s;
	vector<int>dsum(size(s));
	int t=0;
	vector<vector<int>>three(3);
	set<string>ans;
	map<string,int>app;
	rep(i,size(s)){
		t+=s[i]-'0';
		three[t%3].push_back(i);
	}
	int cnt=0;
	rep(i,3){

		rep(j,size(three[i])){
			if(i==0 && three[i][j]>=3){
				ans.insert(s.substr(0,three[i][j]+1));
				app[s.substr(0,three[i][j]+1)]++;
				//cnt+=isMultiple(s.substr(0,three[i][j]+1),10,2019);		
			}
			FOR(k,j+1,size(three[i])){
				ans.insert(s.substr(three[i][j]+1,three[i][k]-three[i][j]));
				app[s.substr(three[i][j]+1,three[i][k]-three[i][j])]++;
				//cnt+=isMultiple(s.substr(three[i][j]+1,three[i][k]-three[i][j]),10,2019);
			}
		}
	}
	for(auto i=ans.begin();i!= ans.end();i++){
		cnt+=app[*i]*isMultiple(*i,10,2019);
	}
	/*FOR(i,4,size(s)+1){
		int digitsum=0;
		rep(j,i){
			digitsum+=s[j]-'0';
		}
//		cout<<digitsum<<endl;
		if(digitsum%3==0){
			cpp_int tmp(s.substr(0,i));
			if(tmp%673==0){
				cnt++;
				//cout<<tmp<<endl;
				//cout<<1<<" "<<i<<endl;
			}
		}
		FOR(k,i,size(s)){
			
			digitsum-=s[k-i]-'0';
			digitsum+=s[k]-'0';
			//cout<<" "<<digitsum<<endl;
			if(digitsum%3==0){
				cpp_int tmp(s.substr(k-i+1,i));
				if(tmp%673==0){
					cnt++;
					//cout<<<<" "<<k+i<<endl;
				}
			}
		}
	}*/
	cout<<cnt<<endl;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	solve();
	return 0;
}


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

#include <iostream>
#include <math.h>
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <vector>
#include <string>
#include <map>
#define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
//#define rep(i, n) for(int (i) = 0, TmP = (n); (i) < (int)TmP ; ++(i))
#define asort(v, n) sort((v), (v + n)) //Using array
#define vsort(v) sort((v).begin(), (v).end()) // Using vector
#define vint vector<int>
typedef long long ll;

using namespace std;

signed main(){
  cin.tie(nullptr);
  ios::sync_with_stdio(false);

  string n;
  cin >> n;

  int ans = 0;

  for(int i = 0; i < n.length() - 4; i++){
    for(int j = i + 4; j < n.length(); j++){
      string substr = n.substr(i, j - i + 1);
      int m = atoi(substr.c_str());
      if(m % 2019 == 0)ans++;
    }
  }
  cout << ans << endl;
}

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

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

void solve()
{
    string s;
    cin >> s;
    int c = 0;
    for (int i = 0; i < s.size() - 4; i++)
    {
        for (int j = i + 3; j < s.size(); j++)
        {
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
            if (x % (unsigned long long)2019 == 0)
                c++;
            if (j - i > 10)
                break;
        }
    }
    cout << c;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:7: error: not a statement
    cin >> s;
        ^
Main.java:13: error: not a statement
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
            ^
Main.java:13: error: not a statement
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                     ^
Main.java:14: error: not a statement
            if (x % (unsigned long long)2019 == 0)
                                   ^
Main.java:20: error: not a statement
    cout << c;
         ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
void solve()
^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: ';' expected
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                    ^
Main.java:13: error: ';' expected
            unsigned long long x = stoull(s.substr(i, j + 1), nullptr, 10);
                         ^
Main.java:14: error: ')' expected
            if (x % (unsigned long long)2019 == 0)
                             ^
Main.java:14: error: ';' expected
            if (x % (unsigned long long)2019 == 0)
                                       ^
Main.java:24: error: not a statement
    ios_base::sync_with_stdio(0);
    ^
Main.java:24: error: ';' expected
    ios_base::sync_with_stdio(0);
                             ^
14 errors
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;
  cin >> s;
  int n=1;
  rep(i,s.length()-1) if(s.at(i)!=s.at(i+1)) n++;
  cout << (s.length-2)/3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: 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 '()' ?)
   10 |   cout << (s.length-2)/3 << endl;
      |            ~~^~~~~~
      |                    ()