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

#include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR if(DEBUG) cerr
#define MACRO(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,NAME,...) NAME
#define pr(...) CERR<<MACRO(__VA_ARGS__,pr10,pr9,pr8,pr7,pr6,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__)<<endl
#define pr1(a) (#a)<<"="<<(a)<<" "
#define pr2(a,b) pr1(a)<<pr1(b)
#define pr3(a,b,c) pr1(a)<<pr2(b,c)
#define pr4(a,b,c,d) pr1(a)<<pr3(b,c,d)
#define pr5(a,b,c,d,e) pr1(a)<<pr4(b,c,d,e)
#define pr6(a,b,c,d,e,f) pr1(a)<<pr5(b,c,d,e,f)
#define pr7(a,b,c,d,e,f,g) pr1(a)<<pr6(b,c,d,e,f,g)
#define pr8(a,b,c,d,e,f,g,h) pr1(a)<<pr7(b,c,d,e,f,g,h)
#define pr9(a,b,c,d,e,f,g,h,i) pr1(a)<<pr8(b,c,d,e,f,g,h,i)
#define pr10(a,b,c,d,e,f,g,h,i,j) pr1(a)<<pr9(b,c,d,e,f,g,h,i,j)
#define prArr(a){CERR<<(#a)<<"={";int i=0;for(auto t:(a))CERR<<(i++?", ":"")<<t;CERR<<"}"<<endl;}
#else
#define DEBUG 0
#define pr(...)
#define prArr(a)
#endif
using namespace std;
using Int = long long;
using _int = int;
using ll = long long;
using Double = long double;
const Int INF = (1LL<<60)+1e9; // ~ 1.15 * 1e18
const Int mod = 2019;
const Double EPS = 1e-8;
const Double PI = 6.0 * asin((Double)0.5);
using P = pair<Int,Int>;
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
template<class T1, class T2> ostream& operator<<(ostream& o,pair<T1,T2> p){return o<<"("<<p.first<<","<<p.second<<")";}
template<class T1, class T2, class T3> ostream& operator<<(ostream& o,tuple<T1,T2,T3> t){return o<<"("<<get<0>(t)<<","<<get<1>(t)<<","<<get<2>(t)<<")";}
template<class T1, class T2> istream& operator>>(istream& i,pair<T1,T2> &p){return i>>p.first>>p.second;}
template<class T> ostream& operator<<(ostream& o,vector<T> a){Int i=0;for(T t:a)o<<(i++?" ":"")<<t;return o;}
template<class T> istream& operator>>(istream& i,vector<T> &a){for(T &t:a)i>>t;return i;}
//INSERT ABOVE HERE

string S;
Int  mem[200001][2019];
_int used[200001][2019];

Int dfs(Int i, Int d){
  if(i == (Int)S.size()) return d == 0;
  if(used[i][d]++) return mem[i][d];
  Int num = S[i] - '0';
  Int res = dfs(i + 1, (d * 10 + num) % mod);
  res += d == 0;
  return mem[i][d] = res;
}

signed main(){
  srand((unsigned)time(NULL));
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  cin>>S;

  Int ans = 0;
  Int N = S.size();
  for(Int i=0;i<N;i++){
    ans += dfs(i, 0) - 1;
  }
  cout<<ans<<endl;

  return 0;
}


Compiler output:
/tmp/ccjUON1Z.o: in function `dfs(long long, long long)':
a.cc:(.text+0x57): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccjUON1Z.o
a.cc:(.text+0x7e): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccjUON1Z.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#define _USE_MATH_DEFINES
#include<math.h>
#include<algorithm>
#include<memory>
#include<string>
typedef long long ll;
#define Rep(i,n) for(int i = 0;i < (n);i++)	

int gcd(int a, int b) { if (b == 0)  return a;  else  return gcd(b, a % b);  }
int lcm(int a, int b) { return a * b / gcd(a, b); }
void swap(int& a, int& b) { int temp = a; a = b; b = temp; return; }
int ncr(int n, int r) { int a = 1; Rep(i, r) a = (a * (n - i)) / (i + 1); return a; }
int npr(int n, int r) { int a = 1; Rep(i, r) a *= n - i; return a; }
int mod(int a, int b) { return a % b; }

int main() {
	/*int s, w;
	std::cin >> s >> w;
	if (s <= w) {
		std::cout << "unsafe" << std::endl;
	}
	else {
		std::cout << "safe" << std::endl;
	}*/
	/*
	int a, b, c, d;
	std::cin >> a >> b >> c >> d;
	if ((a-1) / d >= (c-1) / b) {
		std::cout << "Yes" << std::endl;
	}
	else {
		std::cout << "No" << std::endl;
	}*/
	/*int n;
	std::vector<std::string> s;
	std::cin >> n;
	Rep(i, n) {
		int count = 0;
		std::string a;
		std::cin >> a;
		Rep(i, s.size()) {
			if (a == s[i]) {
				count = 1;
				break;
			}
		}
		if (count == 0) {
			s.emplace_back(a);
		}
	}
	std::cout << s.size() << std::endl;
	*/
	std::vector<char> c;
	std::string a;
	std::cin >> a;
	int ans = 0;
	for (int i = 1; i < c.size(); i++) {
		for (int j = 0; j < i; j++) {
			std::string g = a.substr(j, i);
			int k = std::atoi(g.c_str);
			if (k % 2019 == 0) {
				ans++;
			}
		}
	}
	std::cout << ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:45: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   62 |                         int k = std::atoi(g.c_str);
      |                                           ~~^~~~~
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:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
Language: C++

/* Author: Rennan Rocha
 * Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define F first
#define S second
#define PB push_back
#define MP make_pair

#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pi pair<int,int>
#define pll pair<ll, ll>
#define vpi vector<pi>
#define vpll vector<pll>

#define INF 1e18
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//*find_by_order(); order_of_key();

int dp[200001][2019][2];
string s;
int n;
int solve(int i, int r, bool ini) {
    if(i >= n) return 0;
    if(dp[i][r][ini] != -1) return dp[i][r][ini];
    int val = (((r * 10) + (s[i]-'0')) % 2019);
    return (val==0 && !ini) + solve(i+1, val, 0) + solve(i+1, 0, 1) - solve(i+2, 0, 1);
}

int main() {
    ios_base::sync_with_stdio(false);
    memset(dp, -1, sizeof dp);
    cin >> s;
    n = s.size();
    cout << solve(0,0,1) << endl;
}


Compiler output:
/tmp/ccBc6tJi.o: in function `solve(int, int, bool)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccBc6tJi.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccBc6tJi.o
/tmp/ccBc6tJi.o: in function `main':
a.cc:(.text+0x198): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccBc6tJi.o
a.cc:(.text+0x1b1): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccBc6tJi.o
a.cc:(.text+0x1bf): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccBc6tJi.o
/tmp/ccBc6tJi.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x208): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccBc6tJi.o
a.cc:(.text+0x221): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccBc6tJi.o
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
    string s;
    cin >> s;
    int64_t cnt = 0;
    for(int i = 0; i < s.size() - 3; i++){
        
        int64_t tmp;
        int64_t rest = 0;

        for(int j = 0; j < s.size() - i - 3; j++){
            if(j == 0) tmp = stoi(s.substr(i, 4));
            else tmp = s[j + i + 3] - '0';

            // cout << tmp << endl;

            rest = (rest * 10 + tmp) % 2019;

            // cout << "rest" << j << ": " << rest << endl;

            if(rest == 0) cnt++;
        }
    }

    cout << cnt << 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;
typedef long long ll;
#define rep(i, n)  for (int i = 0; i <  (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
const int MOD = 1000000007;

bool hantei(string s,int m){
  int wk_S=0;
  int wk_N=0;
  rep(i,s.length()){
    wk_N = s.at(i) - '0';
    wk_S = (wk_S*10 + wk_N)%m;
  }
  if(wk_S==0){ return true;}
  else{return false;}
}

int main() {
  ll Ans = 0;  // 回答：
  string S; cin >> S; // 判定文字列：最大長200000
  int L=S.length();   // 文字列長
  map<int,int>  M;  // i桁目までの数値が割り切れたか回数

  rep(i,L){ // 切取り開始位置
    rep1(j,L){  // 切り取る長さ
      if(i+j>L){break;}
      if(hantei(S.substr(i,j),2019)){
        Ans++;
        if(i>1){ Ans+=M[i-1]; }
        M[i+j-1]++;
        break;
      }
    }
  }

  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>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const int MOD = 1000000007;
const ll INF = 1LL << 60;

int a[10];
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    int cnt = 0;
    for (int i = 0; i < 10; i++)
        a[i] = 1;
    vector<ll> vc(s.length()), sum(s.length());
    sum[0] = 0;
    for (int i = 0; i < s.length() - 4; i++)
    {
        bool flag = false;
        if (a[s[i] - '0'])
        {
            for (int j = i + 4; j < s.length(); j++)
            {
                string d = s.substr(i, j - i + 1);
                int num = 0;
                for (int k = 0; k < d.length(); k++)
                {
                    num *= 10;
                    num += d[k] - '0';
                }
                //    cout << num << endl;
                if (num % 2019 == 0)
                {
                    flag = true;
                    cnt++;
                }
            }
        }
        if (flag)
        {
            s[s[i] - '0'] = 0;
        }
    }
    cout << cnt << 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 rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
  string S;
  cin >> S;
  int ans = 0;
  rep(i,S.size()-3){
    for(ll j=i+4; j < S.size()+1;j++){
      if(stoll(S.substr(i,j))%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 <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
# define ll int64_t
# define rep(i,n) for(ll i=0;i<n;i++)
# define rrep(i,n) for(ll i=1;i<=n;i++)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define mod 1000000007
# define PI 3.141592653589793
# define vec vector
#define dump(x) cerr<<#x<<"="<<x<<endl
using namespace std;

bool compare_by_b(pair<string,ll> a,pair<string,ll> b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}

bool my_compare(pair<string,ll> a,pair<string,ll> b){
    if(a.first != b.first) return a.first<b.first;
    if(a.second != b.second) return a.second>b.second;
    else return true;
}

ll factorial(ll n){
    ll x=1;
    rrep(i,n) (x*=i)%=mod;
    return x;
}

ll gcd(ll a,ll b){
   if (a%b == 0) return(b);
   else return(gcd(b,a%b));
}

ll lcm(ll a,ll b){
   return a/gcd(a,b)*b;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    string s;
    ll ans=0;
    cin>>s;
    
    vec<pair<ll,ll>> a(s.size()+1);
    for(ll i=s.size();i>0;i--){
        string c=s.substr(s.size()-i);
        ll l=stoll(c, nullptr, 10);
        a[i].first=l;
        a[i].second=i;
    }
    
    for(ll i=0;i<a.size();i++){
        for(ll j=i+1;j<a.size();j++){
            ll sum=a[j].first-a[i].first;
            if(min(a[j].second,a[i].second)!=0) sum=sum/(10*min(a[j].second,a[i].second));
            if(sum%2019==0) ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}


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

/* Author: Rennan Rocha
 * Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define F first
#define S second
#define PB push_back
#define MP make_pair

#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pi pair<int,int>
#define pll pair<ll, ll>
#define vpi vector<pi>
#define vpll vector<pll>

#define INF 1e18
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//*find_by_order(); order_of_key();

ll dp[200001][2019][2];
string s;
int n;
int solve(int i, int r, bool ini) {
    if(i >= n) return 0;
    if(dp[i][r][ini] != -1) return dp[i][r][ini];
    int val = (((r * 10) + (s[i]-'0')) % 2019);
    return (val==0 && !ini) + solve(i+1, val, 0) + solve(i+1, 0, 1) - solve(i+2, 0, 1);
}

int main() {
    ios_base::sync_with_stdio(false);
    memset(dp, -1, sizeof dp);
    cin >> s;
    n = s.size();
    cout << solve(0,0,1) << endl;
}


Compiler output:
/tmp/ccbbFWR2.o: in function `solve(int, int, bool)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccbbFWR2.o
a.cc:(.text+0xb7): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccbbFWR2.o
/tmp/ccbbFWR2.o: in function `main':
a.cc:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccbbFWR2.o
a.cc:(.text+0x1b9): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccbbFWR2.o
a.cc:(.text+0x1c7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccbbFWR2.o
/tmp/ccbbFWR2.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x210): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccbbFWR2.o
a.cc:(.text+0x229): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccbbFWR2.o
collect2: error: ld returned 1 exit status
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Main {
    public  static void main(String[] args) {
        FastScanner sc = new FastScanner();
         String text = sc.next();
         int a;
         int count = 0;
         try {
             for (int i = 0; i < text.length() - 4; i++) {
                 for (int j = i + 3; j < text.length(); j++) {
                     a = Integer.parseInt(text.substring(i, j)) {
                         if (a % 2019 == 0) {
                             count++;
                         }
                     }
                 }
             }
         }catch(IOException e) {
             
         }
         System.out.print(count);
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

}

Compiler output:
Main.java:14: error: ';' expected
                     a = Integer.parseInt(text.substring(i, j)) {
                                                               ^
1 error
Language: Java

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<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.java:7: error: class EL is public, should be declared in a file named EL.java
public class EL {
       ^
1 error
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Main {
    public  static void main(String[] args) {
        FastScanner sc = new FastScanner();
         String text = sc.next();
         int a;
         int count = 0;
         for(int i = 0; i < text.length() - 4; i++) {
             for(int j = i+3; j < text.length(); j++) {
                 a = Integer.parseInt(text.substring(i, j));
                 try {
                  if(a % 2019 == 0) {
                      count++;
                  } 
                 } catch (IOException e) {
                     
                 }
             }
         }
         System.out.print(count);
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

}

Compiler output:
Main.java:18: error: exception IOException is never thrown in body of corresponding try statement
                 } catch (IOException e) {
                   ^
1 error
Language: Java

package API;

import java.util.Scanner;

public class test{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        int len = S.length();
        int num = 0;
        for (int i = 0; i < len - 3; i++) {
            for (int j = i+3; j < len; j++) {
                if (S.charAt(i) == 1) {
                    j++;
                }
                int sum = 0;
                for (int k = i; k <= j; k++) {
                    sum = sum * 10 + (S.charAt(k)-'0');
                }
                if (sum % 2019 == 0) {
                    num++;
                }
            }
        }

        System.out.println(num);

    }

}


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

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

int main() {
	string str;
	cin>>str;
	int count = 0;
	for(int i = 0; i < str.length(); i++) {
		string mat;
		mat.append(to_string(str[i]-'0'));
		
		for(int j = i+1; j < str.length(); j++) {
			mat = mat + (char)str[j];
			stringstream check(mat);
			long long num=0;
			check>>num;
			if(num%2019 == 0) {
				count++;
				break;
		}
	}
	cout<<count;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

s = input()
n = len(s)
pp = [1]
for i in range(n+1):
    pp.append(pp[i] * 10 % 2019)
a = [0] * (n+1)
for i in range(n):
    a[i+1] = a[i]*10 + int(s[i])
b = set()
for i in range(n+1):
    b.add((a[i]*pp[n-i])%2019)

print(n+1 - len(b))

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
string S;
int N;
int ans;
int num;
int main() {
  cin >> S;
  N = S.size();
  for (int i = 0; i < N - 3; i++) {
    for (int j = i; j < N; j++) {
      num = atoi(S.substr(i, j - i + 1).c_str());
      if (num % 2019 == 0) {
        ans++;
      }
    }
  }
  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.Scanner;

public class test{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        int len = S.length();
        int num = 0;
        for (int i = 0; i < len - 3; i++) {
            for (int j = i+3; j < len; j++) {
                if (S.charAt(i) == 1) {
                    j++;
                }
                int sum = 0;
                for (int k = i; k <= j; k++) {
                    sum = sum * 10 + (S.charAt(k)-'0');
                }
                if (sum % 2019 == 0) {
                    num++;
                }
            }
        }

        System.out.println(num);

    }


Compiler output:
Main.java:26: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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

#define int long long
#define MOD 1000000007

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(i) (i).begin(), (i).end()
#define rall(i) (i).begin(), (i).end(), greater<int>()
#define elif else if
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define fst first
#define sec second
template <typename T>
void print(T x)
{
    std::cout << x << '\n';
}
typedef long long ll;

int t_index[200000][200000];
string s;
int ans = 0;

int cToi(char x)
{
    return x - '0';
}

int fun(int a, int b)
{

    if (a == b)
    {
        return cToi(s[a]);
    }
    if (t_index[a][b] != 0)
    {

        return t_index[a][b];
    }
    else
    {
        int temp = fun(a, b - 1) * 10 + cToi(s[b]);
        if (temp % 2019 == 0)
        {

            ans++;
        }
        return temp;
    }
}

signed main()
{
    cin >> s;

    int len = s.size();

    if (len < 4)
    {
        cout << "0" << endl;
        return 0;
    }

    for (int i = 0; i < len; i++)
    {
        fun(i, len - 1);
    }

    cout << ans << endl;
    return 0;
}


Compiler output:
/tmp/ccR48SB7.o: in function `fun(long long, long long)':
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0xdf): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0x145): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccR48SB7.o
/tmp/ccR48SB7.o: in function `main':
a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0x177): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0x1f3): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccR48SB7.o
/tmp/ccR48SB7.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x229): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
a.cc:(.text+0x242): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccR48SB7.o
collect2: error: ld returned 1 exit status
Language: Java

public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        int len = S.length();
        int num = 0;
        for (int i = 0; i < len - 3; i++) {
            for (int j = i+3; j < len; j++) {
                if (S.charAt(i) == 1) {
                    j++;
                }
                int sum = 0;
                for (int k = i; k <= j; k++) {
                    sum = sum * 10 + (S.charAt(k)-'0');
                }
                if (sum % 2019 == 0) {
                    num++;
                }
            }
        }

        System.out.println(num);

    }


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;

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

Compiler output:
Main.java:11: error: cannot find symbol
          for(int i = 0; i < str.length; i++){
                                ^
  symbol:   variable length
  location: variable str of type String
Main.java:12: error: cannot find symbol
            for(int j = 1; i < str.length; i++) {
                                  ^
  symbol:   variable length
  location: variable str of type String
Main.java:13: error: cannot find symbol
              num2 = Integer.parseInt(str2.substring(i, j));
                                          ^
  symbol:   method substring(int,int)
  location: variable str2 of type String[]
3 errors
Language: C

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

int main(){
  string s;
  cin >> s;
  long long ans=0;
  int n=s.size();
  for (int i=0; i<=n-4; i++){
    for(int j=i+3; j<=n-1&&j<=i+12; j++){
      string pp=s.substr(i,j-i+1);
      long long tmp;
      tmp = stoll(pp);
      if (tmp%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;
typedef long long int ll;
typedef vector<ll> vll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(a) sort(a.begin(), a.end())
#define fin(ans) cout << (ans) << endl
const int INF = 1<<30;
const ll MOD = 1000000007;

int main() {
    string S;
    ll ans=0;
    cin >> S;

    for (int i = 4; i <= S.size(); i++) {
        ll sum=0;
        for (int j = 0; j < S.size()-4; j++) {           
            string str;
            str = S.substr(j,i);
            if(str.size()!=i) continue;
            ll a = stoll(str);
            if(a%2019==0){
                sum++;
                cout << a << endl;
            }
        }
        ans+=sum;
        //if(sum==0) break;
    }

    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;
string s;
int hash[200003],cnt[2019],pw[200003];
long long ans;
int main(){
	cin>>s;cnt[0]=1;pw[0]=1;
	for(int i=0;i<s.size();i++)pw[i+1]=pw[i]*10%2019;
	for(int i=0;i<s.size();i++)hash[i+1]=(hash[i]+(s[i]-'0')*pw[s.size()-i-1])%2019,cnt[hash[i+1]]++;
	for(int i=0;i<2019;i++)
		ans+=cnt[i]*(cnt[i]-1)/2;
	cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: reference to 'hash' is ambiguous
    9 |         for(int i=0;i<s.size();i++)hash[i+1]=(hash[i]+(s[i]-'0')*pw[s.size()-i-1])%2019,cnt[hash[i+1]]++;
      |                                    ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 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/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:4:5: note:                 'int hash [200003]'
    4 | int hash[200003],cnt[2019],pw[200003];
      |     ^~~~
a.cc:9:47: error: reference to 'hash' is ambiguous
    9 |         for(int i=0;i<s.size();i++)hash[i+1]=(hash[i]+(s[i]-'0')*pw[s.size()-i-1])%2019,cnt[hash[i+1]]++;
      |                                               ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:4:5: note:                 'int hash [200003]'
    4 | int hash[200003],cnt[2019],pw[200003];
      |     ^~~~
a.cc:9:93: error: reference to 'hash' is ambiguous
    9 |         for(int i=0;i<s.size();i++)hash[i+1]=(hash[i]+(s[i]-'0')*pw[s.size()-i-1])%2019,cnt[hash[i+1]]++;
      |                                                                                             ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:4:5: note:                 'int hash [200003]'
    4 | int hash[200003],cnt[2019],pw[200003];
      |     ^~~~
Language: Java

import java.util.*;

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

Compiler output:
Main.java:14: error: illegal start of expression
          if( % 2019 == 0){
              ^
1 error
Language: C

#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

int main(){
  string s; cin >> s;
  int n = static_cast<int>(s.size());
  vector<ll> dp1(2019);
  ll cnt = 0;
  for(int i = 0; i < n; ++i){
    vector<ll> dp0(2019);
    int x = s[i] - '0';
    for(int j = 0; j < 2019; ++j){
      dp0[(j*10+x)%2019] += dp1[j];
    }
    dp0[x]++;
    cnt += dp0[0];
    dp1 = move(dp0);    
  }
  cout << cnt << endl;
  return 0;  
}


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 <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
    string s;
    cin >> s;
    int n = s.size();
    vector<int> a(n + 1, 0);
    int m = 2019;
    int ten = 1;
    for (int i = n - 1; i >= 0; i--) {
        int d = (s[i] - '0') * ten % m;
        a[i] = (a[i + 1] + d) % m;
        ten *= 10;
        ten %= m;
    }
    ll ans = 0;
    vector<ll> cnt(n, 0);
    for (int i = n - 1; i >= 0; i--) {
        ans += cnt[i];
        cnt[a[i]]++;
    }
    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>
#define pb push_back
#define mp make_pair
#define ll long long
#define ld long double
#define endl "\n"
#define int long long
#define test int t; cin>>t; while(t--)
#define debug(x) cout<<#x<<" "<<(x)<<endl
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int N=1e5;
signed main()
{
	fastio
	//test
	{
        string s; cin>>s;
        map<int, int> m;
        int ans=0;
        for(int i=0;i<s.length();i++)
        {
        	int rem=0;
        	int pref=0;
        	for(int j=i;j<s.length();j++)
        	{
        		rem=(10*rem+int(s[j]-'0'))%2019;
        		if(m[rem])
        			break;
        		else
                    m[rem]++;
        		if(rem==0)
        			pref++;
                
        	}
            ans+=(pref*(pref+1))/2;	
            m.clear();
        }
        
        cout<<ans;
  	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before 'long'
    7 | #define int long long
      |             ^~~~
a.cc:27:37: note: in expansion of macro 'int'
   27 |                         rem=(10*rem+int(s[j]-'0'))%2019;
      |                                     ^~~
a.cc:27:37: error: expected ')' before 'long'
   27 |                         rem=(10*rem+int(s[j]-'0'))%2019;
      |                             ~       ^
      |                                     )
Language: C

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


int main(){
    string S;
    cin >> S;
    int size = S.size();
    ll cnt = 0;
    string substr;
    rep(i, size-4){
        for(int j = i+4; j <= size; j++){
            substr = "";
            if (abs(i - j ) < 3 || abs(i - j) > size) continue; 
            for (int k= i; k < j; k++){
                substr += S.at(k);
            }
            ll sl = stoll(substr);
            if (sl%2019 == 0){
                cnt ++;
            }
        }
    }
    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<iostream>
//#include<algorithm>
//#include<string>
//#include <cmath>
//#include <vector>
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define REP(x,n) for(int x=0;x<n;x++)

//vector//
#define vei vector<int> 
#define velli vector<long long int> 
#define pb(x) push_back(x) // 末尾にxを加える
#define pb2 pop_back() // 末尾削除
#define all(x) (x).begin(),(x).end() //イテレーター
#define be(x) (x).begin()
//auto  auto begin = v.begin()とか

typedef pair<int,int> P;  //q(p.first,p.second)

int main (){
    string s;
    cin >> s;
    int ans = 0;
    int n = s.size();
    REP(i,n-1){
        int num = s[i] - '0';
        // cout << num << endl;
        for(int j=i+1; j<n;j++){
            int d = s[j] - '0';
            num = num*10 + d;
            // cout << num << endl;
            if (num % 2019 ==0){
                ans++;
                num = 0;
            }
        }
    }
    cout << ans;
}

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

import java.util.*;
import java.util.Map.Entry;
 
 
 class Main {
//	 static int mod =  (int) (Math.pow(10,9)+7);
	 static int mod =  2019;
	 static List<ArrayList<Integer>>  list = new ArrayList<ArrayList<Integer>>();
    public static void main(String[] args) {
    
        Scanner sc = new Scanner(System.in);
        long mod=2019;
        long[] modinv = new long[200005];
        long t=1;
        for(int i=0;i<200005;i++) {
        	modinv[i]=modinv(t);
        	t=(t*10)%mod;
        }
        
        
        
        
        String S = sc.next();
        char[] c = S.toCharArray();
        long[] m = new long[c.length];
        long[] sum = new long[c.length];
        long tmp=1;
        for(int i=0;i<c.length;i++) {
        	m[i]=(tmp*(int)(c[c.length-1-i]-'0'))%mod;
        	if(i==0) {
        		sum[i]=m[i];
        	} else {
        		sum[i]=(sum[i-1]+m[i])%mod;
        	}
        	tmp=(tmp*10)%mod;
        }
        long ans=0;
        long[] an=new long[200000];
        an[0]=1;
        for(int i=1;i<200000;i++) {
        	an[i]=an[i-1]+i+1;
        }
        Arrays.sort(sum);
        int tt=0;
        for(int i=0;i<sum.length-1;i++) {
        	if(sum[i]==0||sum[i]==sum[i+1])tt++;
        	else {
        		if(tt!=0)ans=ans+an[tt-1];
        		tt=0;
        	}
        }
        if(tt!=0)ans=ans+an[tt-1];	
/*        for(int i=0;i<c.length-1;i++) {
        	for(int j=i+1;j<c.length;j++) {
        		if(i==0) {
        			if(sum[j]==0)ans++;
        		} else {
            		if(((sum[j]-sum[i-1]+2019)*modinv[i])%mod==0) {
            			//System.out.println(i + "and" + j);
            			ans++;
            		}        			
        		}
        	}
        }*/
    	
    	
    	System.out.println(ans);
    	
        		
    }
    
	public static long pow(long a,long n) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a)%mod;
	        }
	        a=(a*a)%mod;
	        n>>=1;
	    }
	    return res;
	}
 
	public static long modinv(long n) {
		return pow(n, mod-2)%mod;
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.Map.Entry;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.Map.Entry;
      |            ^
main.c:5:2: error: unknown type name 'class'
    5 |  class Main {
      |  ^~~~~
main.c:5:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 |  class Main {
      |             ^
Language: C

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

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

  ll r = 0;
  vector<ll> v(K);
  for (auto e : s) {
    vector<ll> u(K);
    int d = e - '0';
    u[d] += 1;
    for (int i = 0; i < K; i++) {
      u[(10 * i + d) % K] += v[i];
    }
    r += u[0];
    v = u;
  }
  cout << r << 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<vector>

using namespace std;

int main()
{
  string s;
  cin>>s;
  
  int buf1=0;
  
  string buf={};
  
  int ans=0;
  int buf2=0;
  int buf3=s.length()
  
  for(int i=0;i<buf3-1;i++)
  {
    for(int j=i+1;j<=buf3-1;j++)
    {
      buf1=i;
      
		while(buf1!=j)
        {
          buf.push_back(s[buf1]);
          buf1++;
        }
      
      buf2=stoi(buf);
      
      if(buf2%2019==0)
        ans++;
      
      buf.clear();
      
    }
  }
  
  cout<<ans<<endl;
  
  return 0;
}


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

#include <bits/stdc++.h>

int main(int, char**) {
        int64_t c = 0;
        int64_t num;
        std::cin >> num;
        std::string s = std::to_string(num);
        int64_t l = s.size();
        for (int64_t i=4; i<l+1; i++) {
                for (int64_t j=0; j<l-i+1; j++) {
                        std::string sub = s.substr(j, i);
                        long long sub_num = std::stoll(sub);
                        if (sub_num%2019 == 0) {
                                c++;
                        }
                }
        }
        std::cout << c << std::endl;
        return 0;
}
~   

Compiler output:
a.cc:21:2: error: expected class-name at end of input
   21 | ~
      |  ^
Language: C++

#include <iostream>
#include <vector>
#include<string>
#include <algorithm>

#define ll         long long

#define vi         vector<int>
#define vs         vector<string>

#define vpii       vector<pair<int,int>>
#define vpis       vector<pair<int,string>>
#define vpss       vector<pair<string,string>>
#define mkp        make_pair

#define vvi        vector<vector<int>>
#define vvs        vector<vector<string>>

using namespace std;

int main()
{
  ll int si;
  int ans = 0;
  string s,k;
  cin >> s;

  for(ll int i = 0 ; i < ll int(s.size()); i++)
  {
    for(ll int j = i + 3; j < ll int(s.size()); j++)
    {
      k = s.substr(i, j - i + 1);
      si = stoll(k);
      if (si % 2019 == 0) {
        ans++;
      }
    }
  }

  cout << ans;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected primary-expression before 'long'
    6 | #define ll         long long
      |                    ^~~~
a.cc:28:26: note: in expansion of macro 'll'
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |                          ^~
a.cc:28:25: error: expected ';' before 'long'
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |                         ^
      |                         ;
a.cc:6:20: error: expected primary-expression before 'long'
    6 | #define ll         long long
      |                    ^~~~
a.cc:28:26: note: in expansion of macro 'll'
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |                          ^~
a.cc:28:25: error: expected ')' before 'long'
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |      ~                  ^
      |                         )
a.cc:6:20: error: expected primary-expression before 'long'
    6 | #define ll         long long
      |                    ^~~~
a.cc:28:26: note: in expansion of macro 'll'
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |                          ^~
a.cc:28:44: error: 'i' was not declared in this scope
   28 |   for(ll int i = 0 ; i < ll int(s.size()); i++)
      |                                            ^
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 = 0;i < n.length - 3;i ++) {
                for (int j = i + 3;j < n.length;j ++) {
                    int factor = 1;
                    int t = 0;
                    for (int k = j;k >= i;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 <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
const int maxs = 201900000;

int main(int argc, char** argv) {
	string s;
	cin >> s;
	int num = s.size();
	int dp[200000];
	memset(dp, 0, sizeof(dp));
	dp[0] = s[0] - '0';
	int result = 0;
	for (int j = 1; j < num; j++) {
		dp[j] = (dp[j - 1] * 10) % maxs + (s[j] - '0');
		if (dp[j] % 2019 == 0)
			result++;
	}
	for (int i = 1; i < num; i++) {
		for (int j = i; j < num; j++) {
			int pow_result = 1;
			for (int k = 0; k < j - i + 1; k++) {
				pow_result = (10LL * pow_result) % maxs;
			}
			int temp = (dp[j] - (s[i - 1] - '0') * pow_result) % maxs;
			if (temp % 2019 == 0)
				result++;
			dp[j] = temp;
		}
	}

	cout << result << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(dp, 0, sizeof(dp));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <cmath>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
string f(ll x)
{
    string z="";
    while(x>0)
    {
        z+=((x%10)+'0');
        x/=10;
    }
    reverse(z.begin(),z.end());
    return z;
}
ll finn( string a , string b)
{
    ll ans=0;
    string str_to_search=b, str=a;

	int nPos = str.find(str_to_search, 0); // fist occurrence

	while ((unsigned)nPos != string::npos)
	{
		ans++;
		nPos = str.find(str_to_search, nPos + 1);
	}
	return ans;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string xx;
    cin >> xx;
    vector<string>s;
    ll occ=0;
    string mashy;
    for(int i = 2019 ; i <= 1800000 ; i+=2019)
    {
        mashy=f(i);
        if(mashy.size()==xx.size())
        {
            if(mashy==xx)
            {
                ans++;
                break;
            }
            break;
        }
        occ+=finn(xx,mashy);
    }
    cout << occ;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |                 ans++;
      |                 ^~~
      |                 abs