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

#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;

int main(){
   int i=0;
  char s[200001];
   long long a=0,d=1LL,x=0,count[2019]={1LL};
    i=scanf("%s",s);
    i=strlen(s);
   while(i--){
           x=(x+(s[i]-'0')*d)%2019;
            a+=count[x]++;
               d=d*10%2019;
               }
        printf("%lld\n",a)；
               return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected ';' before '\U0000ff1b'
   17 |         printf("%lld\n",a)；
      |                           ^~
      |                           ;
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for(int i=m; i<n; i++)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
template <typename T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1;} return 0; }
template <typename T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1;} return 0; }

ll a[200001];
ll S[200010];
ll ans[2019];
int main() {
    string s; cin>>s;
    reverse(s.begin(),s.end());
    int j=1;
    rep(i,0,s.size()){
        j%=2019;
        a[i]=s[i]-'0';
        a[i]*=j;
        a[i]%=2019;
        j*=10;
        S[i+1]+=a[i]+S[i];
        S[i+1]%=2019;
    }
    //rep(i,0,s.size()+1) cout<<S[i]<<" ";
    
    
    rep(i,0,s.size()+1){
        ans[S[i]]++;
    }
    ll res=0;
    rep(i,0,2019){
        res+=ans[i]*(ans[i]-1)/2;
    }
    cout<<res<<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.h>
#include <cstdio>
#include <stdlib.h>
#include <math.h>
using namespace std;

int ctoi(char c) {
	switch (c) {
		case '0': return 0;
		case '1': return 1;
		case '2': return 2;
		case '3': return 3;
		case '4': return 4;
		case '5': return 5;
		case '6': return 6;
		case '7': return 7;
		case '8': return 8;
		case '9': return 9;
		default: return 0;
	}
}

int main(){
    char a[2000000];

    scanf("%s", a);

    int amari[2019];
    long length = strlen(a);
    
    long T[length + 1];
    T[length] = 0;

    for(long i = length; i > 0; i--){
        T[i - 1] = pow(10, length - i) * ctoi(a[i - 1])+ T[i];
    }

    for(long i = 0; i <= length; i++){
        T[i] = T[i] % 2019;
    }

    /*for(long i = 0; i <= length; i++){
        printf("%ld : %ld\n", i, T[i]);
    }*/

    for(int j = 0; j < 2019; j++){
        amari[j] = 0;
    }

    for(long i = 0; i <= length; i++){
        amari[T[i]]++;
    }

    for(int j = 0; j < 2019; j++){
        amari[j] = amari[j] * (amari[j] - 1)/2;
    }

    int count = 0;

    for(int j = 0; j < 2019; j++){
        count = count + amari[j];
    }

    printf("%d\n", count);





    

    return 0;
    
}

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

S = input()

p = 2019
N = len(S)
t = [0]*(N+1)
for i in range(N-1,-1,-1):
  k = (int(S[i])*10**(N-i-1))%p
  t[i] = (t[i+1]+k)%p
t= t[:N]
cnt = [0]*p
for i in range(N):
  cnt[t[i]]+=1
ans = cnt[0]
for i in range(1,p):
  if cnt[i] > 0:
    ans += cnt[i]-1

print(ans)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | S = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'S' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | S = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:3:1: error: expected ',' or ';' before 'p'
    3 | p = 2019
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int mod(string num, int a)
{
    // Initialize result
    int res = 0;

    // One by one process all digits of 'num'
    for (int i = 0; i < num.length(); i++)
         res = (res*10 + (int)num[i] - '0') %a;

    return res;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string S;
    cin >> S;
    int n = S.length();
    string N;
    map<int, int> m;
    int ans = 0;
    for(int i = n-1; i >= 0; i--) {
        string A;
        A += S[i];
        N.insert(0, A);
        int md = mod(N, 2019);
        if (md == 0 || m[md]) ans++;
        m[md]++;
    }
    cout << ans;
    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 <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(x),end(x)
#define show(obj) {for(auto x:obj)cout<<x<<' ';cout<<endl;}
#define line "----------"
typedef long long ll;
typedef pair<int,int> ip;
typedef pair<ll,ll> lp;
const int inf = 1001001000;
const ll INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

ll rep_power_modM(ll a, ll n, ll M = MOD){
    if(n == 0)return 1;
    if(n%2 == 0){ll tmp = rep_power_modM(a,n/2,M); return tmp*tmp%M;}
    return a*rep_power_modM(a,n-1,M)%M;
}

int main(){
	int N,P; cin>>N;
	P = 2019;
	string s; cin>>s;
	if(10%P == 0){
		ll ans = 0;
		rep(i,N){
			if((s[i]-'0')%P == 0){
				ans += i+1;
			}
		}
		cout<<ans<<endl;
		return 0;
	}
	vector<int> rest(N);
	REP(i,N){
		ll t = s[N-i]-'0';
		rest[i-1] = (t*rep_power_modM(10,i-1, P)) % P;
	}
	vector<int> sum(N+1,0);
	map<ll,ll> cnt;
	cnt[0]++;
	rep(i,N){
		sum[i+1] = (sum[i]+rest[i]) % P;
		cnt[sum[i+1]]++;
	}
	ll ans = 0LL;
	for(auto x:cnt){
		ans += x.second*(x.second-1LL)/2;
	}
	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

#include <bits/stdc++.h>

using namespace std;

#define intt long long
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);

const int N = 200005;
const int MOD = 2019;

int ten[N], t[N], cnt[MOD];

int main() {

    FAST;

    string a;
    cin >> a;
    ten[0] = 1;
    int n = a.length();
    a = ' ' + a;
    for (int i = 1; i <= n; i ++) {
        ten[i] = (ten[i - 1] * 10) % MOD;
    }
    t[n] = 0;
    for (int i = n - 1; i >= 0; i --) {
        t[i] = (t[i + 1] + (ten[n - i - 1]) * (int(a[i + 1]) - '0')) % MOD;
    }
    for (int i = 0; i <= n; i ++) {
        cnt[t[i]] ++;
    }
    int ans = 0;
    for (int i = 0; i < MOD; i ++) {
        ans += cnt[i] * (cnt[i] - 1) / 2;
    }
    cout << ans << '\n';
    return 0;
}


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

#include<bits/stdc++.h>
#define ll long long
using namespace std;
map<string,int> m;
int main(){
	for(int i=1;i<=100;i++){
		int a=2019*i;
		char c[10];
		itoa(a,c,10);
		m[c]=1;
	}
	string s;cin>>s;
	int ans=0;
	for(int i=0;i<s.length();i++){
		if(m[s.substr(i,4)]==1) ans++;
		if(m[s.substr(i,5)]==1) ans++;
	}
	cout<<ans<<endl;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'itoa' was not declared in this scope
    9 |                 itoa(a,c,10);
      |                 ^~~~
Language: C

n = input()
countArray = [0] * 2019
count = 0
countArray[0] +=1
for i in range(len(n)):
    countArray[int(n[-i-1:])%2019]+=1

for i in countArray:
    count += (i * (i - 1)) / 2
print(int(count))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | n = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'countArray'
    2 | countArray = [0] * 2019
      | ^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:79: error: expected ')' before ';' token
    5 |                                   for(int j=i+4;j<b;j++){m*=10;m+=(S.at(j)-'0';m%=2019;if(!m)x++;}}
      |                                                                   ~           ^
      |                                                                               )
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:71: error: 'j' was not declared in this scope
    5 |                                   for(int j=i+4;j<b;i++)m*=10;m+=S.at(j);m%=2019;if(!m)x++;}
      |                                                                       ^
Language: C

#include <bits/stdc++.h>
#define lli long long int
using namespace std;
#define mod 1000000007
#define MOD 1000000037
#define mod1 998244353
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); 
#define INF 1e18

int main()
{
    string s;
    cin >> s;
    int n=s.length(),p=2019;
    if(p==2)
    {
        lli ans=0;
        for(int i=s.length()-1;i>-1;i--)
        {
            int t=s[i]-'0';
            if(t%2==0)
                ans+=i+1;
        }
        cout << ans << endl;
    }
    else if(p==5)
    {
        lli ans=0;
        for(int i=s.length()-1;i>-1;i--)
        {
            int t=s[i]-'0';
            if(t%5==0)
                ans+=i+1;
        }
        cout << ans << endl;
    }
    else
    {
        int rarr[n];
        int t=s[n-1]-'0',prem=t%p,power=10;
        rarr[n-1]=prem;
        for(int i=s.length()-2;i>-1;i--)
        {
            t=s[i]-'0';
            prem=(power*t+prem)%p;
            rarr[i]=prem;
            power=(power*1LL*10)%p;
        }
        // for(int i=0;i<n;i++)
        //     cout << rarr[i] << " ";
        // cout << endl;
        int nnum[p];
        for(int i=0;i<p;i++)
            nnum[i]=0;
        nnum[rarr[0]]=1;
        lli ans=0;
        for(int i=1;i<n;i++)
        {
            ans+=nnum[rarr[i]];
            nnum[rarr[i]]+=1;
        }
        ans+=nnum[0];
        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 <iomanip>
#include <stack>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <queue>
#include <stdio.h>
#include <math.h>

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef vector<vector<int>> vvi;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef vector<ll> vll;

typedef pair<int, int> pii;

typedef queue<int> qi;
typedef queue<string> qs;


#define rep(i, n) for(int i=0; i<(n); ++i)
#define repp(i, a, b) for(int i = (a); i <= (b); i++)
#define repm(i, a, b) for(int i = (a); i >= (b); i--)

#define all(v) v.begin(), v.end()
//sort( all(v) )　などと使える




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

    ll n = s.size();

    //割ったあまりがいくつあるか？をまとめておく
    map<int, ll> mod_map;
    mod_map[0]++;


    ll sum = 0;
    ll base = 1;
    rep(i, n){
        //「右から」i桁目をll_s_iにもってくる
        //char => ll に変換している
        char char_s_i = s[n-1-i];
        ll  ll_s_i = char_s_i - '0';

        //300000000000とか
        ll ll_s_i_keta = ll_s_i * base;
        ll_s_i_keta %= 2019; 

        //sum += ll_s_i * base;
        sum += ll_s_i_keta;

        sum %= 2019;

        int r = sum;
        mod_map[r]++;

        base *= 10;
        base %= 2019;
    }

    ll cnt = 0;
    rep(i, 2019){
        ll m = mod_map[i];
        cnt += m*(m-1)/2;
    }

    cout << cnt << endl;
}

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

#include <bits/stdc++.h>
#if ONLINE_JUDGE
#define DEBUG false
#else
#define DEBUG true
#endif
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define rREP(i, k, n) for (int i = (int)(n)-1; i >= k; i--)
#define foreach(i, vec) for(auto &&i : vec)
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort(all(x))
#define REV(x) reverse(all(x))
#define MAX(x) *max_element(all(x))
#define MIN(x) *min_element(all(x))
#define LOWitr(x, n) lower_bound(all(x), n)
#define UPRitr(x, n) upper_bound(all(x), n)
#define cii(x) int x;cin >> x
#define cill(x) LL x;cin >> x
#define cis(x) string x;cin >> x
#define co(x) cout << x << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define truecheck assert
#define dump(x) cerr << #x << ": " << (x) << endl
using namespace std;
typedef long long LL;
typedef long long int64;
typedef std::vector<int> VI;
typedef std::vector<VI> VVI;
typedef std::vector<LL> VL;
typedef std::vector<VL> VVL;
typedef std::vector<string> VS;
typedef std::pair<int, int> PII;
typedef std::pair<int64, int64> PLL;
typedef std::queue<int> QI;
typedef std::priority_queue<int> PQI;
template<class T,class U>inline bool chmax(T &a, const U &b){if (a<b){a=b;return true;}return false;}
template<class T,class U>inline bool chmin(T &a, const U &b){if (b<a){a=b;return true;}return false;}
template<class T,class U>inline void vcin(T &v, U n){rep(i, n){typename T::value_type a;cin >> a;v.pb(a);}}

const int INF = 1e9, MOD = 1e9 + 7;
const LL LLINF = 1e16;
// M_PI 3.1415...

int main() {
    fastcin();
    cout << fixed << setprecision(10);
    cis(s);
    VI mod(2019);
    LL pre = 0, temp = 1;
    mod[0]++;
    rrep(i, s.length()){
        LL sum = (s[i]-'0') * temp + pre;
        sum %= 2019;
        mod[sum]++;
        temp = temp * 10 % 2019;
        pre = sum;
    }
    LL ans = 0;
    rep(i, 2019){
        ans += mod[i] * (mod[i]-1) / 2;
    }
    co(ans);
    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;
using ll = long long;

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

    int n = s.size();
    int p = 2019;

    ll ans = 0;
    if(10 % p == 0){
        for(int i=0;i<n;i++){
            if((s[i]-'0')%p==0) ans += i+1; 
        }
    }else{
        vector<int> d(n+1,0);
        int ten = 1;
        for(int i=n-1;i>=0;i--){
            int tmp = (s[i]-'0')*ten % p;
            d[i] = (d[i+1]+tmp)%p;
            ten *= 10; ten %= p;
        }

        map<int,ll> mp;
        for(int i=0;i<=n;i++) mp[d[i]]++;
        for(auto p: mp){
            ll k = p.second;
            k *= k-1; k /= 2;
            ans += k;
            //cout << "mod:" << p.first << ", num:" << p.second << endl;
        }
    }

    cout << ans << 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

s=input()

s=s[::-1]
mod=2019
lis=[0 for i in range(2019)]
lis[0]+=1
k=0
ans=0

for i in range(len(s)):
    k=(k+int(s[i])*(10**i)) % mod
    lis[k]+=1
    
for i in range(2019):
    ans+=(lis[i]*(lis[i]-1))//2
    
print(ans)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | s=input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:3: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | s=input()
      |   ^~~~~
main.c:1:3: error: initializer element is not constant
main.c:3:1: error: expected ',' or ';' before 's'
    3 | s=s[::-1]
      | ^
Language: C

s=input()

s=s[::-1] #文字列sをスライスでリバース
mod=2019
lis=[0 for i in range(2019)]
lis[0]+=1
k=0
ans=0

for i in range(len(s)):
    k=(k+int(s[i])*(10**i)) % mod
    lis[k]+=1
    
for i in range(2019):
    ans+=(lis[i]*(lis[i]-1))//2
    
print(ans)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | s=input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:3: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | s=input()
      |   ^~~~~
main.c:1:3: error: initializer element is not constant
main.c:3:1: error: expected ',' or ';' before 's'
    3 | s=s[::-1] #文字列sをスライスでリバース
      | ^
main.c:3:11: error: stray '#' in program
    3 | s=s[::-1] #文字列sをスライスでリバース
      |           ^
Language: C++


       string s;
         cin>>s;
          ll n=s.size();
           vector<vector<ll> > dp(n+1,vector<ll>(2019,0) );
           ll ans=0;
           for(ll i=1;i<=n;i++)
           { ll a=s[i-1]-'0';
               for(ll j=0;j<2019;j++)
               {
                   dp[i][(j*10+a)%2019]+=dp[i-1][j];

               }
               dp[i][a]++;
               ans+=dp[i][0];
           }
           cout<<ans<<endl;

      return 0;
}


Compiler output:
a.cc:2:8: error: 'string' does not name a type
    2 |        string s;
      |        ^~~~~~
a.cc:3:10: error: 'cin' does not name a type
    3 |          cin>>s;
      |          ^~~
a.cc:4:11: error: 'll' does not name a type
    4 |           ll n=s.size();
      |           ^~
a.cc:5:12: error: 'vector' does not name a type
    5 |            vector<vector<ll> > dp(n+1,vector<ll>(2019,0) );
      |            ^~~~~~
a.cc:6:12: error: 'll' does not name a type
    6 |            ll ans=0;
      |            ^~
a.cc:7:12: error: expected unqualified-id before 'for'
    7 |            for(ll i=1;i<=n;i++)
      |            ^~~
a.cc:7:23: error: 'i' does not name a type
    7 |            for(ll i=1;i<=n;i++)
      |                       ^
a.cc:7:28: error: 'i' does not name a type
    7 |            for(ll i=1;i<=n;i++)
      |                            ^
a.cc:17:12: error: 'cout' does not name a type
   17 |            cout<<ans<<endl;
      |            ^~~~
a.cc:19:7: error: expected unqualified-id before 'return'
   19 |       return 0;
      |       ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C

#include "bits/stdc++.h"
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define cool ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int  long long int
#define pb push_back
#define fe first
#define lb lower_bound 
#define ub upper_bound
#define pii pair<pair<int,int>,pair<int,int> >
#define se second
#define endl "\n"
#define pi pair<int, int>
#define mi          map<int,int>
#define mii         map<pi,int>
#define vi vector<int> 
#define vvi vector<vi>
#define bs   binary_search
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)	
#define all(c) (c).begin(),(c).end()
#define sz(x)       (int)x.size() 
#define PI 3.14159265358979323846

 const int N=2e5+5;

 int mod= 2019;
 int dx[4]={0,0,+1,-1};
 int dy[4]={+1,-1,0,0};  
 
 
int po(int a, int b) {
	a %= mod;
	int res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res * a) % mod;
		a =(a*a) % mod;
		b >>= 1;
	}
	 return res;	
   }
  

   
 void solve() {
	   string s;
	   cin>>s;
	   int len=sz(s);
	   mi mp;
	   int cur=0;
	   mp[0]=1;
	   rep(i,0,len) {
		      cur*=10;
		      cur+=s[i]-'0';
		      int val=po(10,len-i+1)*cur%mod;
		      mp[val]++; 
		      
		   }
		   int sm=0;
		   for(auto to:mp) 
		     sm+=(to.se*(to.se-1))/2;
		     cout<<sm<<endl;
	   
	   		
						   
 }

    
int32_t main() {
	cool;
	int t=1;
	//cin>>t;
	while(t--)
	solve();


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;
using ll = long long;
#define each(i, mp) for(auto& i:mp)

int main() {
    string s;
    cin >> s;
    map<ll, ll> mp;
    //mp[0] = 1;
    reverse(s.begin(), s.end());
    ll now = 0, ten = 1;
    each(e, s) {
        now = (now + (e - '0') * ten) % 2019;
        ten *= 10;
        ten %= 2019;
        mp[now]++;
    }
    ll ans = 0;
    each(e, mp) {
        ans += e.second * (e.second - 1) / 2;
    }
    cout << ans << '\n';
    return 0;
}

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

import java.math.*;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Reader {
	    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }


}

public class Main {

    public static void main(String args[]){
        
		Reader.init( System.in );       
        String str =Reader.next();
        int count=0;
        //String sun=str.substring(0,4);
        //System.out.println(sun);
        for(int i=0;i<str.length()-4;i++){

                //System.out.println(str.substring(i,i+5));
                BigInteger B = new BigInteger(str.substring(i,i+5));
                if(BigInteger.ZERO == B.remainder(BigInteger.valueOf((long) 2019))){
                    count++;
                }
               // System.out.println(B);
            }
            //System.out.println(count);

        System.out.println(count);
    }

}


Compiler output:
Main.java:45: error: unreported exception IOException; must be caught or declared to be thrown
        String str =Reader.next();
                               ^
1 error
Language: Java

import java.math.*;
import java.util.*;
class Reader {
	    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }


}

public class Main {

    public static void main(String args[]){
        
		Reader.init( System.in );       
        String str =Reader.next();
        int count=0;
        //String sun=str.substring(0,4);
        //System.out.println(sun);
        for(int i=0;i<str.length()-4;i++){

                //System.out.println(str.substring(i,i+5));
                BigInteger B = new BigInteger(str.substring(i,i+5));
                if(BigInteger.ZERO == B.remainder(BigInteger.valueOf((long) 2019))){
                    count++;
                }
               // System.out.println(B);
            }
            //System.out.println(count);

        System.out.println(count);
    }

}


Compiler output:
Main.java:4: error: cannot find symbol
	    static BufferedReader reader;
	           ^
  symbol:   class BufferedReader
  location: class Reader
Main.java:8: error: cannot find symbol
    static void init(InputStream input) {
                     ^
  symbol:   class InputStream
  location: class Reader
Main.java:15: error: cannot find symbol
    static String next() throws IOException {
                                ^
  symbol:   class IOException
  location: class Reader
Main.java:24: error: cannot find symbol
    static int nextInt() throws IOException {
                                ^
  symbol:   class IOException
  location: class Reader
Main.java:28: error: cannot find symbol
    static double nextDouble() throws IOException {
                                      ^
  symbol:   class IOException
  location: class Reader
Main.java:9: error: cannot find symbol
        reader = new BufferedReader(
                     ^
  symbol:   class BufferedReader
  location: class Reader
Main.java:10: error: cannot find symbol
                new InputStreamReader(input) );
                    ^
  symbol:   class InputStreamReader
  location: class Reader
7 errors
Language: C++

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

int main() {
  string s;
  cin >> s;
  int d = 1;
  int acc = 0;
  vector<int> data(2019);
  data.at(0) = 1;
  int ans = 0;
  int m = 0;
  int n = s.size();
  for (int i = n - 1; i >= 0; i--) {
    m = s.at(i) - '0';
    acc = (d * m + acc) % 2019;
    ans += data.at(acc);
    data.at(acc)++;
    d = d * 10 % 2019;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int main() {
  string s;
  cin >> s;
  int d = 1;
  int acc = 0;
  vector<int> data(2019);
  data.at(0) = 1;
  int ans = 0;
  int m = 0;
  int n = s.size();
  for (int i = n - 1; i >= 0; i--) {
    m = s.at(i) - '0';
    acc = (d * m + acc) % 2019;
    ans += data.at(acc);
    data.at(acc)++;
    d = d * 10 % 2019;
  }
  cout << ans << endl;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;
const ll MAX_N = 100010;
 
int main() {
    string s;
    cin >> s;
    ll n = s.size();

    const ll p = 2019;
    
    vl rui(n+1);
    ll ten = 1;
    for(ll i = n-1; i >= 0; i--) {
        ll x = (s[i] - '0')*ten%p;
        rui[i] = (rui[i+1] + x)%p;
        ten *= 10;
        ten %= p;
    }
    
    vl cnt(p);
    ll ans = 0;
    for(ll i = n; i >= 0; i--) {
        ans += cnt[rui[i]];
        cnt[rui[i]]++;
    }
    
    out(ans);
    re0;
}

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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; }
const ll INF = 1LL << 60;
#define mod 2019

vector<ll> cnt(2019);

int main() {
    string s; cin >> s;
    int n = s.length();

    cnt[0] = 1;
    int rem = 0;
    int p = 1;
    for (int i = n - 1; i >= 0; i--) {
        rem = (rem + (p * (s[i] - '0'))) % mod;
        cnt[rem]++;
        p = (10 * p) % mod;
    }
    ll ans = 0;
    for (auto m : cnt) {
        ans += m * (m - 1) / 2;
    }
    cout << ans << endl;
    return 0;
}

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

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

int r(string &s, int64_t i) {
  int64_t t = s.size();
  if (i == t) {
    return 0;
  }
  else {
    int64_t a = s.at(i) - 48;
    return (r(s, i + 1) + a * pow(10, t - i - 1)) % 2019;
  }
}

int main() {
  string s;
  cin >> s;
  map<int64_t, int64_t> m;
  int64_t t = s.size()
  for (int64_t i = 0; i < t; i++) {
    if (m.count(r(s, i))) {
      m[r(s, i)]++;
    }
    else {
      m[r(s, i)] = 1;
    }
  }
  int64_t res = 0;
  for (int j = 0; j < 2019; j++) {
    if (m.count(j)) {
      res += m[j] * (m[j] - 1) / 2;
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int r(std::string&, int64_t)':
a.cc:11:51: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   11 |     return (r(s, i + 1) + a * pow(10, t - i - 1)) % 2019;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
      |                         |                           |
      |                         |                           int
      |                         __gnu_cxx::__promote<double>::__type {aka double}
a.cc: In function 'int main()':
a.cc:20:3: error: expected ',' or ';' before 'for'
   20 |   for (int64_t i = 0; i < t; i++) {
      |   ^~~
a.cc:20:23: error: 'i' was not declared in this scope
   20 |   for (int64_t i = 0; i < t; i++) {
      |                       ^
Language: C++

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

int r(string &s, int64_t i) {
  if (i == s.size()) {
    return 0;
  }
  else {
    int64_t a = s.at(i) - 48;
    return (r(s, i + 1) + a * pow(10, s.size() - i - 1)) % 2019;
  }
}

int main() {
  string s;
  cin >> s;
  map<int64_t, int64_t> m;
  for (int64_t i = 0; i < s.size(); i++) {
    if (m.count(r(s, i))) {
      m[r(s, i)]++;
    }
    else {
      m[r(s, i)] = 1;
    }
  }
  int64_t res = 0;
  for (int j = 0; j < 2019; j++) {
    if (m.count(j)) {
      res += m[j] * (m[j] - 1) / 2;
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int r(std::string&, int64_t)':
a.cc:10:58: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   10 |     return (r(s, i + 1) + a * pow(10, s.size() - i - 1)) % 2019;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
      |                         |                                  |
      |                         |                                  int
      |                         __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int r(string &s, int i) {
  if (i == s.size()) {
    return 0;
  }
  else {
    int a = s.at(i) - 48;
    return (r(s, i + 1) + a * pow(10, s.size() - i - 1)) % 2019;
  }
}

int main() {
  string s;
  cin >> s;
  map<int, int> m;
  for (int i = 0; i < s.size(); i++) {
    if (m.count(r(s, i))) {
      m[r(s, i)]++;
    }
    else {
      m[r(s, i)] = 1;
    }
  }
  int res = 0;
  for (int j = 0; j < 2019; j++) {
    if (m.count(j)) {
      res += m[j] * (m[j] - 1) / 2;
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int r(std::string&, int)':
a.cc:10:58: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   10 |     return (r(s, i + 1) + a * pow(10, s.size() - i - 1)) % 2019;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
      |                         |                                  |
      |                         |                                  int
      |                         __gnu_cxx::__promote<double>::__type {aka double}
Language: C

#include <iostream>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <bits/stdc++.h>

// #include <string>
using namespace std;

using ll = long long; // int64
const int mod = 1e9 + 7;

int main()
{
    string s;
    cin >> s;
    int n = s.size();
    int cnt[2020] = {0};
    cnt[0] = 1; // 2019で割り切れる数ならば それ自体が答えになる.
    int d = 1;
    int ans = 0;
    int acc = 0;
    int m = 0;

    for (int i = n-1; i >= 0; i--) {
        m = s[i] - '0';
        acc = (d*m + acc) % 2019;
        ans += cnt[acc];
        cnt[acc]++;
        d = (d * 10) % 2019;
    }

    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

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <unordered_set>

int main()
{
  std::string s;
  std::cin >> s;
  std::unordered_map<int, int> modMap;
  const int mod = 2019;
  int64_t tmp = 0;
  int64_t digit = 1;
  for (int i = s.size() - 1; i >= 0; --i)
  {
    tmp = tmp + digit * (s[i] - '0');
    modMap[tmp % mod]++;
    digit *= 10;
  }
  int64_t ans = 0;
  for (auto itr : modMap)
  {
    ans += itr.second * (itr.second - 1) / 2;
  }
  ans += modMap[0];
  std::cout << ans << std::endl;
  return 0;
}

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

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int Mod=2019;
typedef long long lol;
lol ans,c[2020],a[200005];
char s[200005];
int n,pow10;
int main()
{
	scanf("%s",s);
	n=strlen(s);
	pow10=1;
	for (int i=n-1;i>=0;i--)
	{
		a[i]=(a[i+1]+(s[i]-'0')*pow10%Mod)%Mod;
		pow10=pow10*10%Mod;
	}
	c[0]++;
	for (int i=n-1;i>=0;i--)
	{
		ans+=c[a[i]];
		//printf("%d %d %d\n",i,a[i],c[a[i]]);
		c[a[i]]++;
	}
	cout<<ans;
} 

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

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



int main() {
    long long ans=0;
    int k, l;
    vector<int> dp(200000);
    string s;
    cin >> s;
    map<int, int> m;
    k=0;
    m[k]=1;
    for(int i=s.size()-1; i>=0; i--) {
        l=(int)(s[i]-'0');
        if(i==s.size()-1) dp[i]=1;
        else dp[i]=dp[i+1]*10;
        dp[i]%=2019;
        k=l*dp[i]+k;
        k%=2019;
        if(m.count(k)) m[k]++;
        else m[k]=1;
    }
    for(int i=0; i<2019; i++) {
        if(m.count(i)) {
            ans+=m.at(i)*(m.at(i)-1)/2;
        }
    }
    cout << ans;
}

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

/**********************************************************************
File    .cpp
Author  Takahiro Yamazaki
**********************************************************************/
/**********************************************************************
Include Libraries
**********************************************************************/
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, a, b) for (int i = a; i < b; i++)
#define each(i, mp) for(auto& i:mp)
/**********************************************************************
Declare variables
**********************************************************************/
/**********************************************************************
Declare instance
**********************************************************************/
/**********************************************************************
Proto_type_Declare functions
**********************************************************************/

/**********************************************************************
Main
**********************************************************************/
int main() {
  // string s;
  // cin >> s;
  // int ans = 0;
  // // int n = s.length();
  // // printf("%s\n", s);
  // // int n = stoi(s.c_str()) / 2019;
  // // int n = stol(s.c_str()) / 2019;
  // int n = 110;
  // // printf("%d\n", n);
  // for (int i = 1; i < n+1; i++) {
  //   int tmp = 2019 * i;
  //   if (s.find(std::to_string(tmp)) != s.npos) {
  //     ans++;
  //   }
  // }
  // printf("%d\n", ans);
  string s;
  cin >> s;
  map<ll, ll> mp;
  mp[0] = 1;
  reverse(s.begin(), s.end());
  ll now = 0, sum = 0, ten = 1;
  each(e, s) {
    // now = (now + (e - '0') * ten) % 2019;
    sum = sum + (e - '0') * ten;
    now = sum % 2019;
    ten *= 10;
    // ten %= 2019;
    mp[now]++;
    cout << ten << ' ' << now << '\n';
  }
  ll ans = 0;
  each(e, mp) {
    ans += e.second * (e.second - 1) / 2;
  }
  cout << ans << '\n';
  return 0;

}
/**********************************************************************
Functions
**********************************************************************/


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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define sayyes cout<<"Yes"<<endl;
#define sayno cout<<"No"<<endl;
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
const int mod =1e9+7;

ll combi(ll a,ll b)
{
    ll ret=1;
    for(ll i=a;i>a-b;i--)
    {
        ret*=i;
    }
    for(ll i=b;i>0;i--)
    {
        ret/=i;
    }
    return ret;
}

int main()
{
    string s;
    cin>>s;
    int n=s.length();
    vector<ll > dp(n+1,0);
    ll ans =0;
    int ten=1;
    for(int i=n-1;i>=0;i--)
    {
        dp[i]=(dp[i+1]+(s[i]-'0')*ten%2019)%2019;
        ten*=10;
        ten%=2019;
    }
    vector<int> p(2019,0);
    for(int i=n;i>=0;i--)
    {
        ans+=p[dp[i]];
        p[dp[i]]++;
    }
    cout<<ans;
}


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 <string>
#include <iostream>
using namespace std;
const int maxN = 2e5+10;
int pow10[maxN],a[maxN],sum[maxN],tong[maxN];
int main()
{
    string s;
    cin>>s;
    int N=s.size();
    pow10[0]=1;
    for(int i=1;i<=N;i++)pow10[i]=pow10[i-1]*10%2019;
    for(int i=0;i<N;i++)a[i+1]=(s[i]-'0')*pow10[N-i-1]%2019;
    int ans=0;
    for(int i=1;i<=N;i++)
    {
        sum[i]=(sum[i-1]+a[i])%2019;
        if(sum[i]==0)ans++;
        ans+=tong[sum[i]];
        tong[sum[i]]++;
    }
    cout<<ans<<endl;
}


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

#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5+10;
int pow10[maxN],a[maxN],sum[maxN],tong[maxN];
int main()
{
    string s;
    cin>>s;
    int N=s.size();
    pow10[0]=1;
    for(int i=1;i<=N;i++)pow10[i]=pow10[i-1]*10%2019;
    for(int i=0;i<N;i++)a[i+1]=(s[i]-'0')*pow10[N-i-1]%2019;
    int ans=0;
    for(int i=1;i<=N;i++)
    {
        sum[i]=(sum[i-1]+a[i])%2019;
        if(sum[i]==0)ans++;
        ans+=tong[sum[i]];
        tong[sum[i]]++;
    }
    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>
using namespace std;
using ll=long long;
int main(){
  string s;
  ll cnt[2020];
  cin>>s;
  ll ans=0;
  cnt[0]=1;
  int tot=0;
  int p=1;
  for(i=n-1;i>=0;i--){
    tot=(tot+(s[i]-'0')*p)%2019;
    ans+=cnt[tot];
    p=(p*10)%2019;
    cnt[tot]++;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i=n-1;i>=0;i--){
      |       ^
a.cc:13:9: error: 'n' was not declared in this scope
   13 |   for(i=n-1;i>=0;i--){
      |         ^
Language: C++

#include <bits/stdc++.h>

int main(int, char**) {
        std::string s;
        std::cin >> s;
        long long l = s.size();
        std::vector<int> mods;
        int prev = 0;
        for (long long i=l; i>0; i--) {
                int mod = (prev + std::pow(10, l-i) * s.at(i - 1)) % 2019;
                prev = mod;
                if (mods.count(mod)) {
                        mods.at(mod)++;
                } else {
                        mods.at(mod) = 1;
                }
        }
        long long count;
        for (const auto& [key, value] : mods) {
                count += value * (value - 1) / 2
        }
        std::cout << count << std::endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:68: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   10 |                 int mod = (prev + std::pow(10, l-i) * s.at(i - 1)) % 2019;
      |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
      |                                 |                                    |
      |                                 |                                    int
      |                                 __gnu_cxx::__promote<double>::__type {aka double}
a.cc:12:26: error: 'class std::vector<int>' has no member named 'count'
   12 |                 if (mods.count(mod)) {
      |                          ^~~~~
a.cc:19:26: error: cannot decompose non-array non-class type 'const int'
   19 |         for (const auto& [key, value] : mods) {
      |                          ^~~~~~~~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define ld long double
#define pb push_back
 
#define sec second
#define fir first
#define mo  998244353
#define inf 1e18
#define rep(i, s, n) for (ll i = s; i < n; i = i + 1)
#define rrep(i,s,n) for(ll i=s;i>=n;i--)
#define adiii\                               
  ios_base::sync_with_stdio(false);\                                      
  cin.tie(NULL);\
  cout.tie(NULL);									
 
ll mod(ll n) { return (n % (ll)mo + (ll)mo)%(ll)mo;}
ll gcd(ll a,ll b) {if (b == 0) return a;return gcd(b, a % b);}

int main(){
	adiii
	string s;cin>>s;
	ll n = s.length();
	vector <ll> cnt(2019,0);
	cnt[0]=1;
	ll ans=0;
	ll t=1;
	ll num=0;
	rrep(i,n-1,0){
		num += (t*(s[i] - '0'))%(ll)2019;
		num = num%(ll)2019;
		t = t*10%2019;
		ans += cnt[num]++;
		
	}
	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<iomanip>
#include<map>
#include<set>
#include<queue>
#include<string>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(a) (a).begin(),(a).end()
#define PI 3.141592653589793238
#define INF 1050000000
#define INFL (long long)(4e18)

using vi = vector<int>;

template<class T>
struct Edge {
    int to;
    T cost;
    Edge() {};
    Edge(int to, T cost) : to(to), cost(cost) {};
};

template<class T>
class Graph {
    int n;
    bool directed;
    vector<vector<Edge<T>>> edges;
public:

    Graph(int n, bool directed) :n(n), directed(directed), edges(vector<vector<Edge<T>>>(n)){};
    Graph() {};

    void add(int from,int to, T cost) {
        edges[from].emplace_back(to, cost);
        if(!directed){
            edges[to].emplace_back(from,cost);
        }
    }

    int size() {
        return n;
    }
};




int main() {

    string S;

    cin >> S;

    vi sum(2019);

    REP(i,2019)sum[i] = 0;

    reverse(ALL(S));

    int tmp = 0;
    int keta = 1;

    REP(i,S.size()){
        int c = S[i] - '0';
        sum[(tmp + keta * c % 2019)%2019]++;
        tmp = (tmp + keta * c % 2019) % 2019;
        keta *= 10; keta %= 2019;
   }

    long long int ans = 0;

    REP(i,2019){
        ans += sum[i] * (sum[i]-1) / 2;
    }
    
    

    cout << ans+sum[0] << endl;

    return 0;
}

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

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

typedef long lint;
typedef long long llint;
typedef pair<int, int> pint;
typedef pair<long long, long long> pllint;

// static const int MAX = 1e6;
// static const int NIL = -1;
// static const ll INF = 1<<21;
static const llint MOD = 2019;

bool compPair(const pint& arg1, const pint& arg2) { return arg1.first > arg2.first; }
template<class T> void chmax(T& a, T b) { if (a < b) { a = b; } }
template<class T> void chmin(T& a, T b) { if (a > b) { a = b; } }

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

    llint a = 0, n;
    n = s.size();

    llint dp[n+1][MOD];
    for(int in=0;in<n+1;in++) {
       for(int im=0;im<MOD;im++) {
           dp[in][im] = 0;
       }
    }

    map<llint, llint> mp;
    mp[0] = 1;
    llint now = 0, ten = 1;
    for(int in=1;in<=n;in++) {
        now += ten*(s.at(n-in)-'0');
        now %= MOD;
        ten *= 10;
        ten %= MOD;
        mp[now]++;
    }

    llint ans=0;
    for(auto im:mp) {
        ans += im.second*(im.second-1)/2;
    }
    
    cout << ans << endl;

    return 0;
}


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