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

#include <stdio.h>

int main(void)
{
  int i, j, result = 0;
  char s[1][200001];
  
  scanf("%s", s[0]);
  
  for( i = 0; s[0][i] != '\0' ; i++ ){
      long long long int sum = s[0][i] - '0';
    for( j = i+4; s[0][j] != '\0'; j++ ){
        sum += (sum * 9) + s[0][j] - '0';
            if( sum % 2019 == 0 ){
                result++;
            }
    }
  }
  
  printf("%d\n", result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: 'long long long' is too long for GCC
   11 |       long long long int sum = s[0][i] - '0';
      |                 ^~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  string a;
  int count = 1;


  for (int i = 1; i < S.size()-3; i++) {
    a = to_string(2019*i);
    if (S.find(a) >= 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;

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

    int n = s.size();

    long long t = 0;
    for(int i = 0; i < n - 3; i++) {
        int tmp = i;
        string tmp_s = s.substr(i, 3);
        long long tmp_ll = stoll(tmp_s);
        for(int j = i + 3; j < n; j++) {
            //string tmp_s2 = s.substr(j, 1);
            int tmp_i = s[j] - '0';
            tmp_ll = tmp_ll * 10 + tmp_i;
            //cout << tmp_ll << endl;

                long long amari = tmp_ll % 2019;
                if(amari == 0) {
                    //cout << i << " " << j << endl;;
                    t++;
                    if(i == tmp) {
                        i = j - 1;
                        tmp = i;
                    };
                }
                tmp_ll = amari;

        }
    }

    cout << t << endl;
    return 0;
}

    string s;
    cin >> s;

    int n = s.size();

    long long t = 0;
    for(int i = 0; i < n - 3; i++) {
        int tmp = i;
        string tmp_s = s.substr(i, 3);
        long long tmp_ll = stoll(tmp_s);
        for(int j = i + 3; j < n; j++) {
            //string tmp_s2 = s.substr(j, 1);
            int tmp_i = s[j] - '0';
            tmp_ll = tmp_ll * 10 + tmp_i;
            //cout << tmp_ll << endl;

            if(tmp_ll >= 2019) {
                long long amari = tmp_ll % 2019;
                if(amari == 0) {
                    //cout << i << " " << j << endl;;
                    t++;
                    if(i == tmp) {
                        i = j - 1;
                        tmp = i;
                    };
                }
                tmp_ll = amari;
            }

        }
    }

    cout << t << endl;
    return 0;
}


Compiler output:
a.cc:40:5: error: 'cin' does not name a type
   40 |     cin >> s;
      |     ^~~
a.cc:45:5: error: expected unqualified-id before 'for'
   45 |     for(int i = 0; i < n - 3; i++) {
      |     ^~~
a.cc:45:20: error: 'i' does not name a type
   45 |     for(int i = 0; i < n - 3; i++) {
      |                    ^
a.cc:45:31: error: 'i' does not name a type
   45 |     for(int i = 0; i < n - 3; i++) {
      |                               ^
a.cc:71:5: error: 'cout' does not name a type
   71 |     cout << t << endl;
      |     ^~~~
a.cc:72:5: error: expected unqualified-id before 'return'
   72 |     return 0;
      |     ^~~~~~
a.cc:73:1: error: expected declaration before '}' token
   73 | }
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
int fg(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
signed main(){
 string N;
  cin>>N;
  int x=0;
  if(N.size()<4){
 cout<<"0";
  }
  else{
  for(int i=1;i<=N.size();i++){
    for(int j=0;j<=N.size()-i;j++){
    string a=N.substr(j,i);
      int A=std::stoi(a);
   if(A%2019==0){
       x++;
     }
    }
  }
  }
}


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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  cpp_int n,m,sum=0,flag=0,num=0,ans=0;
  cin>>n;
  m=n;
  while(m>0){
    m/=10;
    flag++;
  }
  
  m=n;
  
  for(long long j=flag; j>=3; j--){
    long long a=1000;
    while(m/a>0){
      a*=10;
      num=m%a;
      if(num%2019==0)
        ans++;
      
    }
    m/=10;
    
  }
      
  
    
  cout<<ans<<endl;
  
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cpp_int' was not declared in this scope; did you mean 'u_int'?
    6 |   cpp_int n,m,sum=0,flag=0,num=0,ans=0;
      |   ^~~~~~~
      |   u_int
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n;
      |        ^
      |        yn
a.cc:8:3: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |   m=n;
      |   ^
      |   tm
a.cc:11:5: error: 'flag' was not declared in this scope
   11 |     flag++;
      |     ^~~~
a.cc:16:19: error: 'flag' was not declared in this scope
   16 |   for(long long j=flag; j>=3; j--){
      |                   ^~~~
a.cc:20:7: error: 'num' was not declared in this scope; did you mean 'enum'?
   20 |       num=m%a;
      |       ^~~
      |       enum
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         ans++;
      |         ^~~
      |         abs
a.cc:31:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |   cout<<ans<<endl;
      |         ^~~
      |         abs
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 = S.size()
  vector<int> vec(N);
  rep(i, N) vec.at(i) = stoi(S.at(i));
  int64_t ans = 0, div = 0;
  for(int i=0; i++; i < 672){
    for(int j = 0; j++; j < N - i){
      div = (div * 10 + vec.at(j)) % 2019;
      if (div == 0) ans++;
    }
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'vector'
    9 |   vector<int> vec(N);
      |   ^~~~~~
a.cc:10:13: error: 'vec' was not declared in this scope
   10 |   rep(i, N) vec.at(i) = stoi(S.at(i));
      |             ^~~
a.cc:10:29: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |   rep(i, N) vec.at(i) = stoi(S.at(i));
      |                         ~~~~^~~~~~~~~
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: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)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:14:25: error: 'vec' was not declared in this scope
   14 |       div = (div * 10 + vec.at(j)) % 2019;
      |                         ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <boost/multiprecision/cpp_int.hpp>


using namespace std;
int main(){
  string s,k;
  int l,z=0;
  cpp_int p;
  cin>>s;
  l=s.size();
  for(int i=0;i<l-3;i++){
    for(int j=i+3;j<l;j++){
      k=s.substr(i,j-i+1);
      p=stoll(k);
      if(p%2019==0){
        z+=1;
      }
    }
  }
  cout<<z;

}

Compiler output:
a.cc:18:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   18 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public class AtCoder {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        for(int i=0 ; i < s.length() -3 ; i ++){
            for (int j = i + 3; j < s.length(); j ++){
                int num = Integer.parseInt(s.substring(i,j));
                if (num % 2019 == 0){
                    ans ++;
                }

            }
        }
        System.out.println(ans);
    }
}

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

#include <bits/stdc++.h>
using namespace std;
int ans;
string s;
long long si[2000000];
int main(){
    cin>>s;
    int a=s.size();
    for(int i=0;i<a;i++)si[i]=s[i]-48;
    long long nn=si[0];
    for(int z=0;z<a-1;z++){
        nn=nn*10+si[z+1];
    }
    cout<<nn<<endl;
    for(int i=0;i<a-3;i++){
        for(int j=i+3;j<a;j++){
            long long m=1,mm=1;
            for(int x=0;x<a-j(-1);x++)m*=10;
            for(int x=0;x<a-i(-1);x++)mm*=10;
            long long n=nn/m%mm;
            cout<<i<<" "<<j<<" "<<n<<endl;
            if(n%2019==0)ans++;
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: 'j' cannot be used as a function
   18 |             for(int x=0;x<a-j(-1);x++)m*=10;
      |                             ~^~~~
a.cc:19:30: error: 'i' cannot be used as a function
   19 |             for(int x=0;x<a-i(-1);x++)mm*=10;
      |                             ~^~~~
Language: C++

 #include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}
int main() {
   string s;
   cin>>s ;
   ll k= s.size() ;
   vector<ll> a(k) ;
   for(ll i=k-1;i>=0;i--){
     if(i==k-1)
     a[i]=s.at(i);
     else
     a[i]=(a[i+1]+s.at(i)*pow(10,k-1-i));  
   }
   vector<ll> b(2019) ;
   rep(i,2019) b[i]=0 ;
    vector<ll> d(2019) ;
    rep(i,2019) d[i] =a[i]%2019
    rep(i,k){
    rep(j,2019) {
       if( a[i]==j )
       b[j] ++ ;
    }
}
  ll ans=0 ;
  rep(j,2019) 
  ans+= b[j]*(b[j]-1) /2 ;
   
   cout<<ans <<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:32: error: expected ';' before 'for'
   25 |     rep(i,2019) d[i] =a[i]%2019
      |                                ^
      |                                ;
a.cc:26:9: error: 'i' was not declared in this scope
   26 |     rep(i,k){
      |         ^
a.cc:4:34: 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;

int main() {
  string s;
  cin >> s;
  int cnt=0;
  string t;
  int u;
  for (int i=0;i<s.length()-3;i++){
    for (int j=4;j<=s.length()-i;j++){
      t=s.substr(i,j);
      u=(int)t
      if (u%2019==0){
        cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   13 |       u=(int)t
      |         ^~~~~~
Language: Java

import java.util.*;

public class Main {

	public static void main(String[] args) {
			
		Scanner sc = new Scanner(System.in);
		String ss = sc.next();
		String s = new String(s);
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int j = i+4; j < s.length(); j++) {
				if (j - i > 18)
					continue;
				String sub = s.substring(i, j+1);			
				if (Long.parseLong(sub) % 2019 == 0)
					ans++;
			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:9: error: variable s might not have been initialized
		String s = new String(s);
		                      ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	vector<char> c(200000);
	for (int i = 0; i < 200000; ++i)
	{
		cin >> c.at(i);
	}
	vector<int> n(200000);
	for (int i = 0; i < 200000; ++i)
	{
		n.at(i) = c.at(i)-'0';
	}
   int count;
	for (int i = 0; i <199997; ++i)
	{
		if(n.at(i)>0){
		int s = n.at(i)*1000+n.at(i+1)*100+n.at(i+2)*10+n.at(i+3);
		int q = s%2019;
		if(q==0){
		    count++;
		}
		int r=q;
		for (int j = 4; j < 200000-i; ++j)
		{
		    if(n.at(i+j)>0){
			int r = (r*10+n.at(i+j))%2019;
			if(r==0){
				count++;
		
			}
		}
		else{
			break;
			

		
		
	}
		}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:16:9: note: to match this '{'
   16 |         {
      |         ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String sinit = sc.next(); // 文字列
        String a;
        int cnt = 0;
        int index = 0;

        for (int i = 1; i < 100; i++) {
            a = String.valueOf(i * 2019);
            String s = sinit;
            if (s.contains(a)) {
                for (int b = 0; b < s.length() - a.length(); b++) {
                    if (s.indexOf(a,b) != -1){
                        cnt++;
                        s = s.substring(index+a.length());
                    }
                }
            }
        }
        System.out.println(cnt);


    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream> // cout, endl, cin
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound

using namespace std;

int main() {
string S;
  string M = "";
  int ans = 0;
   int num;
  
  cin >> S;
  for(int j = 0; j < S.size(); j++){
    for(int i = 0; i < j; i++){
      M += S.at(i);

    num = stoi(M);
  
        if(num  % 2019 == 0){
          ans += 1;
        }
      }
    }
  }
cout << ans << endl;
}


Compiler output:
a.cc:26:1: error: 'cout' does not name a type
   26 | cout << ans << endl;
      | ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    string S;
    cin >> S;
    string T;
    double a;
    int64_t keta = S.size();
    double sum = 0;
    for (int i = 0; i < keta; i++) {
        for (int j = i; j < keta; j++) {
            T = T + S.at(j);
            a = stoll(T);
            if (a % 2019 == 0) sum = sum + 1;
        }
            T = "";
        }
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   15 |             if (a % 2019 == 0) sum = sum + 1;
      |                 ~ ^ ~~~~
      |                 |   |
      |                 |   int
      |                 double
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
int test[12345678];
signed main() {
	int ans = 0; string s;
	cin >> s;
	test[0] = ((s[0] - '0') * 100) + ((s[1] - '0') * 10) + (s[2] - '0');
	test[1] = ((s[1] - '0') * 10) + (s[2] - '0'); test[2] = (s[2] - '0');
	for (int h = 3; h < s.size(); h++) {
		test[i] = test[i] * 10 + (s[h] - '0');
		if (test[i] != 0) {
			if ((test[i] * 10000) % 2019 == 0) { ans++; }
		}
		test[i] %= 2019;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'i' was not declared in this scope
   11 |                 test[i] = test[i] * 10 + (s[h] - '0');
      |                      ^
Language: C

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){
  string s;
  cin >> s;
  int count = 0;
 
  for (int i = 0; i < s.size() - 3; i++){
    for(int j = 4; j <= s.size()-i; j++){
      string ss = s.substr(i, j+i-1);
      int x = 0;
      stringstream str(ss);
      str >> x;
      if (x % 2019 == 0){
        count++;
      }
    }
  }
  cout << count  << "\n";
}


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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <boost/multiprecision/cpp_int.hpp>


using namespace std;
int main(){
  string s,k;
  int l,z=0;
  mp::cpp_int p;
  cin>>s;
  l=s.size();
  for(int i=0;i<l-3;i++){
    for(int j=i+3;j<l;j++){
      k=s.substr(i,j-i+1);
      p=stoll(k);
      if(p%2019==0){
        z+=1;
      }
    }
  }
  cout<<z;

}

Compiler output:
a.cc:18:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   18 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
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 = S.size()
  vector<int> vec(N);
  rep(i, N) vec.at(i) = stoi(S.at(i));
  int64_t ans = 0, div = 0;
  for(int i=0; i++; i < 672){
    for(int j = 0; j++; j < N - i){
      div = (div * 10 + vec.at(j)) % 2019;
      if (div == 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;
#define endl '\n'
typedef long long ll;
#define all(x) (x).begin(), (x).end()

/**ABC 164*/
int main(){
    string s; cin>>s;
    int cnt=0;
    string aux;
    int j = 4;
    for(int i=0; i<s.size()-4;){
		aux = s.substr(i, j);
		ll x = stoll(aux);
		if((aux[i]-'0') <= (aux[j-1]-'0') && x%2019 == 0 && j<=s.size()){
			cnt++;
		}
		if((aux[i]-'0') > (aux[j-1]-'0') || aux.size()>=18 || j==s.size()){
			i++;
			j = i+3;
			
		}
		j++;
		aux.clear();
    }
    cout<<cnt<<endl;
}


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 <iostream>
#include <string>
#include <map>
#include <math>
using namespace std;

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

	int strLength = S.size();
	int count = 0;

	const int n = 471; // 2019/3 = 673, 471*10+1 = 673*7 

	for (int i = 0; i < (strLength -3); i++)
	{
		for (int j = i+3; j < strLength; j++)
		{
			string numStr = S.substr(i, j - i + 1);
			long long num;
			if(j-i > 10){
				int length = j -i;
				int tmpi = i;
				int mod = 0;
				while (length > 10)
				{
					string tmpNumStr = (numStr.substr(tmpi,10));
					long long tmpNum = std::stoll(tmpNumStr) + mod * 10000000000;
					mod = tmpNum % 2019;

					length -= 10;
					tmpi += 10;
				}
				num = std::stoll(numStr.substr(tmpi, j-tmpi +1)) + mod * math::pow(10, j-tmpi+1);
			}else{
				num = std::stoll(numStr);
			}

			if(num % 2019 == 0){
				count++;
			}
		}
	}

	cout << count << endl;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  string a;
  int count = 0;


  for (int i = 1; i < S.size()-3; i++) {
    a = to_string(2019*i);
    if (S.find(a) >= 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>
#define ll long long
#define fastIO cout << fixed << setprecision(12), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
using namespace std;

const int N = 200000;

int mem[N][2019][3], n;
string str;

int solve(int idx, int rem, int can) {
	if(idx == n) {
		if(can == 2 && rem == 0) return 1;
		return 0;
	}
	int& ret = mem[idx][rem][can];
	if(~ret)
		return ret;
	ret = 0;
	if(can == 2)
		return ret = solve(idx + 1, rem, can);
	if(can == 1) {
		int cur = rem * 10;
		cur %= 2019;
		cur += (str[idx] - '0');
		cur %= 2019;
		ret = solve(idx + 1, cur, can);
		ret += solve(idx + 1, cur, 2);
	} else {
		int cur = rem * 10;
		cur %= 2019;
		cur += (str[idx] - '0');
		cur %= 2019;		ret += solve(idx + 1, rem, can);
		ret += solve(idx + 1, cur, 1);
	}
	return ret;
}

int main() {
	fastIO;
#ifdef LOCAL
//	freopen("input.in", "rt", stdin);
#endif
	memset(mem, -1, sizeof mem);
	cin >> str;
	n = str.size();
	cout << solve(0,0,0);
	return 0;
}


Compiler output:
/tmp/ccC1unty.o: in function `solve(int, int, int)':
a.cc:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccC1unty.o
a.cc:(.text+0x10f): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
a.cc:(.text+0x1d2): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
/tmp/ccC1unty.o: in function `main':
a.cc:(.text+0x2ef): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
a.cc:(.text+0x308): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
a.cc:(.text+0x316): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccC1unty.o
/tmp/ccC1unty.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x351): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
a.cc:(.text+0x36a): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccC1unty.o
collect2: error: ld returned 1 exit status
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          String str = sc.next();
          int lee = Long.parseLong(str);
          int count = 0;
          long num2 = 0;
          for(int i = 0; i < lee; i++){
            for(int j = i+1; j <= lee; j++) {
              num2 = Long.parseLong(str.substring(i, j));
          if( num2 % 2019 == 0){
            count++;
          }
        }
      }
      System.out.println(count);
          }
        }

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from long to int
          int lee = Long.parseLong(str);
                                  ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define N 1000000007
#define ll long long
#define ull unsigned long long
#define mem(a) memset(a,0,sizeof(a))
int main()
{
    cin>>s;
	int n=strlen(s);
	ll sum=0;
	int tem;
	for(int i=0;i<n;i++)
	{
		tem=s[i]-'0';
		a[tem]=1;
		for(int j=0;j<2019;j++)
		{
			if(s1[j]!=0)
			{
			    a[(j*10+tem)%2019]+=s1[j];
			}
		}
		memcpy(s1,a,sizeof(a));
		memset(a,0,sizeof(a));
		sum+=s1[0];
	}
	cout<<sum<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 's' was not declared in this scope
   10 |     cin>>s;
      |          ^
a.cc:17:17: error: 'a' was not declared in this scope
   17 |                 a[tem]=1;
      |                 ^
a.cc:20:28: error: 's1' was not declared in this scope; did you mean 'y1'?
   20 |                         if(s1[j]!=0)
      |                            ^~
      |                            y1
a.cc:25:24: error: 's1' was not declared in this scope; did you mean 'y1'?
   25 |                 memcpy(s1,a,sizeof(a));
      |                        ^~
      |                        y1
Language: C

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define mem0(x) memset(x, 0, sizeof(x))
#define asort(x) sort(x.begin(), x.end());
#define dsort(x, t) sort(x.begin(), a.end(), greater<t>());
#define mp make_pair
#define pb push_back

int main() {
    int cnt = 0;
    string S;
    cin >> S;
    for(int i = 0; i < S.length(); i++) {
        for(int j = 1; j <= S.length() - i; j++) {
            if(atoi(S.substr(i, j).c_str()) % 2019 == 0) {
                cnt++;
                break;
            }
        }
    }
    cout << cnt << 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;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
int main(){
  
  int dp[N][2019] = {};//i番目までに2019で割った余りがいくつあるか
  string s;
  cin>>s;
  int p = atoi(s.at(0));
  dp[0][p] = 1;
  for(int i = 1;i<N;i++){
    for(int k = 0;k<2019;k++){
      p = atoi(s.at(i));
      dp[i][10*k%2019] = dp[i-1][k];
      dp[i][(10*k+p)%2019] = dp[i-1][k];
      dp[i][p]++;
    }
  }
  cout << dp[N-1][0] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   int dp[N][2019] = {};//i番目までに2019で割った余りがいくつあるか
      |          ^
a.cc:11:20: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   11 |   int p = atoi(s.at(0));
      |                ~~~~^~~
      |                    |
      |                    __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:12:3: error: 'dp' was not declared in this scope; did you mean 'p'?
   12 |   dp[0][p] = 1;
      |   ^~
      |   p
a.cc:15:20: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   15 |       p = atoi(s.at(i));
      |                ~~~~^~~
      |                    |
      |                    __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include <stdio.h>
 
int main(void) {
  int S[6], Ans, N;
  Ans = 0;
  if(scanf("%d", S)==1);
  for(i=0;i<6;i++) {
    if (S[i] ='\n') {
      break;
    }
  }
  if (i>3) {
    N = S[0]*1000+S[1]*100+S[2]*10+S[3];
    if (N%2019==0) {
      Ans++;
    }
  }
  if (i>4) {
    N = S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++;
    }
    N = S[0]*10000+S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++;
    }
  }
  if (i=6) {
    N = S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++;
    }
    N = S[0]*100000+S[1]*10000+S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++;
    }
  }
  printf ("%d", Ans);
  return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
#define rep0(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<n;i++)
#define test(a) cout << "*"<<a <<endl; 

int main(){
  string s;
  string sBigin;
  string sNew;
  int i,j;
  long long num;
  int ans = 0;
 
  cin >> s;
  //test(s);
  num = atoll(s.c_str());/*!!*/
  //test(num);
  //test(s.size());
  
  rep0(i,s.size()){
    sBigin = s[i];
    //test(sBigin);
    sNew = sBigin;/*ちゃんと初期化される？*/
    for(j=i+1;j<s.size();j++)
      sNew += s[j];
      num = atoll(sNew.c_str());
      if(num % 2019 == 0){
        ans++;
      }
    }
  }

cout << ans << endl;
  
  
 
}

Compiler output:
a.cc:34:1: error: 'cout' does not name a type
   34 | cout << ans << endl;
      | ^~~~
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C

import Control.Monad
import Data.List
import Data.Char
import qualified Data.Vector as V

main = do
    s <- getLine
    let solves = V.fromList $ map (solve 0) (tails s)
        n = length s
        solve _ [] = 0
        solve p (x:xs) | p' == 0 = 1 + 2 * solves V.! (n - length xs)
                       | otherwise = solve p' xs
            where p' = (10*p + (digitToInt x)) `mod` 2019
    print $ V.sum solves

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import Control.Monad
      | ^~~~~~
main.c:1:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import Control.Monad
      |               ^
main.c:11:27: warning: missing terminating ' character
   11 |         solve p (x:xs) | p' == 0 = 1 + 2 * solves V.! (n - length xs)
      |                           ^
main.c:11:27: error: missing terminating ' character
   11 |         solve p (x:xs) | p' == 0 = 1 + 2 * solves V.! (n - length xs)
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:12:45: warning: missing terminating ' character
   12 |                        | otherwise = solve p' xs
      |                                             ^
main.c:12:45: error: missing terminating ' character
   12 |                        | otherwise = solve p' xs
      |                                             ^~~~
main.c:13:20: warning: missing terminating ' character
   13 |             where p' = (10*p + (digitToInt x)) `mod` 2019
      |                    ^
main.c:13:20: error: missing terminating ' character
   13 |             where p' = (10*p + (digitToInt x)) `mod` 2019
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include <bits/stdc++.h>

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

    std::vector<std::string> multiples;

    for (int i = 2019; i <= 201900000; i += 2019) {
        const std::string buf = std::to_string(i);
        if (buf.find("0") != std::string::npos) {
            continue;
        }
        multiples.push_back(buf);
        std::cout << buf << std::endl;
    }

    int64_t cnt = 0;
    for (const std::string& str : multiples) {
        std::size_t pos = S.find(str);
        while (pos != std::string::npos) {
            ++cnt;
            pos = S.find(str, pos + 1);
        }
    }

    std::cout << cnt << std::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 <stdio.h>
 
int main(void) {
  int S[6], Ans, N;
  Ans = 0;
  if(scanf("%d", S)==1);
  for(i=0,i<6,i++) {
    if (S[i] ='\n') {
      break;
    }
  }
  if (i>3) {
    N = S[0]*1000+S[1]*100+S[2]*10+S[3];
    if (N%2019==0) {
      Ans++;
    }
  }
  if (i>4) {
    N = S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++;
    }
    N = S[0]*10000+S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++;
    }
  }
  if (i=6) {
    N = S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++;
    }
    N = S[0]*100000+S[1]*10000+S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++;
    }
  }
  printf ("%d", Ans);
  return 0;
}

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

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

int re(int s){
  if(s%2019==0){
    return 1;
  }else{
    return 0;
  }
}

int main(){
  string str;
  string substr;
  cin>>str;
  vector<int> v(str.size());
  for(int i=0;i<str.size();i++){
    substr.push_back(str[i]);
    if(i<3){
      v[i]=0;
    }
    v[i] = v[i-1];
    int j=i;
    int k=0;
    while(j>=0 && k==0){
      k= re(stoi(substr.substr(j,i-j)));
      v[i] += k;
      j--;
    }
  }
  cout<<v[str.size()]<<endl;
}

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

#include <iostream>

using namespace std;




int main() {

 string S;
 cin >> S;

int modulos[200000];
long i,j;
char zero;

zero = '0';

long N;
int module;
N=S.length();
module = S[N-1]-zero;
//cout << module << endl;
modulos[0] = module;
int chiffre,puiss;
puiss = 10;
 for (i=N-2;i>=0;i--) {
   chiffre = S[i]-zero;
   module = (module+ chiffre*puiss) % 2019;
   puiss = (10*puiss) % 2019;
   modulos[N-2-i+1] = module;
 //cout << i << " " << module << endl;
  }

 sort(modulos, modulos + N);

 //for (i=0;i<N;i++)
// cout << "SORT " << i << " " << modulos[i] << endl;


 long coll,total_coll,nb_zero;

 i = 0;
 int flag;
 nb_zero = 0;
 while (i<N) {
   if (modulos[i] == 0) {
     nb_zero++;
     i++;
   }
   else {
   flag = 1;
   coll = 0;
   for (j=i+1;(flag) && (j<N);j++)
    if (modulos[j] != modulos[i])
      flag = 0;
    else
      coll++;
    i = j-1;
    if (i == (N-1)) {
      i++;
    }
    if (coll > 0) {
  //    cout << "COLL " << coll << endl;
      nb_zero += ((coll*(coll+1)) >> 1);
    }
   }
 }


  cout << nb_zero << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:2: error: 'sort' was not declared in this scope; did you mean 'short'?
   35 |  sort(modulos, modulos + N);
      |  ^~~~
      |  short
Language: C

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

int main(){
  string str;
  int count = 0;
  cin >> str;
  for(int i=0;i<=str.length()-4;i++){
      for(int j=i+4;j<=str.length();j++){
          long long wareruka = stoll(str.substr(i,j));
          
          if(wareruka % 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 <stdio.h>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <queue>

//#include <bits/stdc++.h>
using namespace std;
#define print(x) cout<<(x)<<endl
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long int
#define pb push_back


int main() {
  string s;
  ll tmp, cnt = 0, N, u, t = 6å;
  cin >> s;
  N = s.size();
  // 2019の倍数を文字列でくっつけていく
  for(int i = 4; i <= N; i++){
    for(int j = 0; j <= N - i; j++){
      if (i < t) {
        tmp = stoll(s.substr(j, i)); // longlongで足りなくなったらREになる
        if(tmp % 2019 == 0) cnt++;
      } else { // stollが死ぬ場合
        tmp = stoll(s.substr(j, t));
        u = tmp % 2019;
        for(int k = j + t; k < j + i; k++){
          if(j + i - k < t) t = k;
          tmp = stoll(s.substr(k, t));
          u += pow(10, t)*u + tmp;
          u %= 2019;
          if(j + i - k < t) {
            k--;
            k += t;
          }
        }
        t = 6;
        if(u == 0) cnt++;
      }    
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:30: error: unable to find numeric literal operator 'operator""\U000000e5'
   20 |   ll tmp, cnt = 0, N, u, t = 6å;
      |                              ^~
Language: C++

#include <iostream>
using namespace std;

const int MAX = 510000;
const int MOD = 1000000007;

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 main() {
    string s; cin >> s;
    int n = s.size();
    int a[n];
    long long sum = 0;
    for(int i=0; i<n; i++){
        a[i] = s[i] -'0';
    }
    int res = 0;
    for(int i=0; i<n; i++){
        sum = a[i];
        for(int j=i+1; j<n j++){
            sum *= 10 + a[j];
            if(sum %2019 == 0) res++;
        }
    }
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:27: error: expected ';' before 'j'
   39 |         for(int j=i+1; j<n j++){
      |                           ^~
      |                           ;
Language: C++

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

int main() {
    string s;
    cin >> s;
    long long ans = 0;

    for (int i = 1; i < 10**199996; i++) {
        string str = to_string(2019 * i);
        if (str.size() > s.size()) break;
        cout << str << endl;
        for (int j = 0; j <= (int)(s.size() - str.size()); j++) {
            cout << "\t" << s.substr(j, str.size()) << endl;
            if (s.substr(j, str.size()) == str) {
                ans++;
                cout << "Yes!" << endl;
            }
        }
    }

    cout << ans << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: invalid type argument of unary '*' (have 'int')
   10 |     for (int i = 1; i < 10**199996; i++) {
      |                            ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define fastIO cout << fixed << setprecision(12), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
using namespace std;

const int N = 2e5 + 9;

int mem[N][2020][2], n;
string str;

int solve(int idx, int rem, int can) {
	if(idx == n) {
		if(can == 2 && rem == 0) return 1;
		return 0;
	}
	int& ret = mem[idx][rem][can];
	if(~ret)
		return ret;
	ret = 0;
	if(can == 2)
		return ret = solve(idx + 1, rem, can);
	if(can == 1) {
		int cur = rem * 10;
		cur %= 2019;
		cur += (str[idx] - '0');
		cur %= 2019;
		ret = solve(idx + 1, cur, can);
		ret += solve(idx + 1, cur, 2);
	} else {
		int cur = rem * 10;
		cur %= 2019;
		cur += (str[idx] - '0');
		cur %= 2019;		ret += solve(idx + 1, rem, can);
		ret += solve(idx + 1, cur, 1);
	}
	return ret;
}

int main() {
	fastIO;
#ifdef LOCAL
//	freopen("input.in", "rt", stdin);
#endif
	memset(mem, -1, sizeof mem);
	cin >> str;
	n = str.size();
	cout << solve(0,0,0);
	return 0;
}


Compiler output:
/tmp/ccA0gn0U.o: in function `solve(int, int, int)':
a.cc:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccA0gn0U.o
a.cc:(.text+0x109): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
a.cc:(.text+0x1cc): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
/tmp/ccA0gn0U.o: in function `main':
a.cc:(.text+0x2e4): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
a.cc:(.text+0x2fd): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
a.cc:(.text+0x30b): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccA0gn0U.o
/tmp/ccA0gn0U.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x346): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
a.cc:(.text+0x35f): relocation truncated to fit: R_X86_64_PC32 against symbol `str[abi:cxx11]' defined in .bss section in /tmp/ccA0gn0U.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;return 1;}return 0;}
using namespace std;
using vint = vector<int>;
using vvint = vector<vector<int>>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<int,int>;
const ll inf = 1e18;
const int MAX = 100005;

//modpow
template <class T>
T modpow(T base, T exp, T modulus) {
  base %= modulus;
  T result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % modulus;
    base = (base * base) % modulus; // llにしないとダメ
    exp >>= 1;
  }
  return result;
}

int main() {
    string s; cin >> s;
    int n = s.size();
    map<ll,ll> mt;
    ll now = s[n-1] - '0';
    mt[0]++;
    mt[now]++;
    for (int i = n-2; i >= 0; i--) {
        now += (s[i]-'0')*modpow(10,n-i-1,2019);
        now %= 2019;
        mt[now]++;
    }
    ll ans = 0;
    for (auto pt = mt.begin(); pt != mt.end(); pt++) {
        ll x = pt->second;
        ans += x*(x-1)/2
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:25: error: expected ';' before '}' token
   45 |         ans += x*(x-1)/2
      |                         ^
      |                         ;
   46 |     }
      |     ~
Language: C

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

int main() {
	string s;
	cin >> s;
	ll ans = 0;
	int n = s.size();
	vector<vector<ll>> dp(n, vector<ll>(n));
	vector<ll> v(2020);
	rep(i, n) {
		int now = (int) (s[i] - '0');
		vector<ll> n = v;
		rep(j, 2019) {
			if(v[j] == 0) continue;
			ll next = (j*10 + now)%2019;
			n[next] += v[j];
			n[j] -= v[j];
			// if(i<5) cout << i << " " << j << " " << next << " " << v[next] << " " << v[j] << endl;
		}
		v = n;
		v[now]++;
		ans += v[0];
	}
	// rep(i, 2019) cout << i << " :" << v[i] << endl;
	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: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          String str = sc.next();
          int count = 0;
          long num2 = 0;
          for(int i = 0; i < Long.parseInt(str); i++){
            for(int j = i+1; j <= Long.parseInt(str); j++) {
              num2 = Integer.parseInt(str.substring(i, j));
          if( num2 % 2019 == 0){
            count++;
          }
        }
      }
      System.out.println(count);
          }
        }

Compiler output:
Main.java:9: error: cannot find symbol
          for(int i = 0; i < Long.parseInt(str); i++){
                                 ^
  symbol:   method parseInt(String)
  location: class Long
Main.java:10: error: cannot find symbol
            for(int j = i+1; j <= Long.parseInt(str); j++) {
                                      ^
  symbol:   method parseInt(String)
  location: class Long
2 errors
Language: C

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

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

    int64_t T = S;
    int count = 0;
    while (T > 0) {
        T = T / 10;
        count++;
    }

    T = S;
    int64_t U = T;
    int64_t X = 1;
    for (int i = 0; i < count - 1; i++) {
        X = X*10;
    }

    int ans;

    for (int i = 0; i < count; i++) {
        if (T == 0) {
            break;
        }
        for (int j = i; j < count; j++) {
            if (U == 0) {
                break;
            }
            if (U % 2019 == 0) {
            ans++;
            }
            U = U / 10;
        }
        T = T % X;
        U = T;
        X = X / 10;
    }
    
    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 <iostream>
#include <string>
#include <sstream>
#include <cstdio>
#include <vector>

using namespace std;

int main(){
  long long int ans=0;
  string S, str;
  long long int num=2019;
  vector<int> findVec;
  cin >> S;
  for(int i=0; i<200000*5; i++){
    num+=2019;
    str = to_string(num);
    findVec = find_all(S, str);
    for (const auto &pos:findVec) ans++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'find_all' was not declared in this scope
   18 |     findVec = find_all(S, str);
      |               ^~~~~~~~
Language: C

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

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

	long long int ans=0;

	for (int i=0; i<s.size()-4; i++)
	{
		for (int j=i+4; j<s.size();j++)
		{
			long long int num;
			istringstream ss = istringstream( s.substr(i,j-i+1));
			ss >> num;
			// cout << num << endl;
			if (num % 2019 == 0)
			{
				ans++;
				cout << i+1 << " " <<  j+1 << endl;
			}
		}
	}

	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 "../../C++/bits/stdc++.h"
using namespace std;


int ModPow(int N, int R, int M) {
  if (R == 0) return 1;
  if (R%2 == 0) {
    int t = ModPow(N, R/2, M);
    return (t*t) % M;
  }
  return N * ModPow(N, R-1, M);
}

int main() {
  string S;
  long long int L;
  cin >> S;
  L = S.length();
  int* M = new int[L];

  int ans = 0;
  map<int, int> mp;
  mp[0] = 1;

  for (long long int i = 0; i < L; i++) {
    int x = stoi(S.substr(L-i-1, 1));
    M[i] = i==0? x : ((x*ModPow(10, i, 2019))%2019 + M[i-1])%2019;
    if (mp.count(M[i]) > 0) {
      ans += mp[M[i]];
      mp[M[i]]++;
    }
    else mp[M[i]] = 1;
  }

  cout << ans << endl;
}

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