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

#include <cstdint>
using namespace std;

static const ull MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve()
{
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++)
    {
        int c;
        if (s[i] == '?')
            c = -1;
        else
            c = s[i] - '0';
        for (j = 0; j < 10; j++)
        {
            if (c != -1 && c != j)
                continue;
            for (ki = 0; ki < 13; ki++)
            {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++)
            dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}

Compiler output:
a.cc:4:14: error: 'ull' does not name a type
    4 | static const ull MOD = 1000000007LL;
      |              ^~~
a.cc: In function 'uint64_t solve()':
a.cc:15:5: error: 'scanf' was not declared in this scope
   15 |     scanf("%s", s);
      |     ^~~~~
a.cc:16:9: error: 'strlen' was not declared in this scope
   16 |     n = strlen(s);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdint>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:36:29: error: 'MOD' was not declared in this scope
   36 |             dp[i + 1][j] %= MOD;
      |                             ^~~
a.cc:40:5: error: 'printf' was not declared in this scope
   40 |     printf("%llu\n", res);
      |     ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <cstdint>
  +++ |+#include <cstdio>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

static const ull MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve()
{
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++)
    {
        int c;
        if (s[i] == '?')
            c = -1;
        else
            c = s[i] - '0';
        for (j = 0; j < 10; j++)
        {
            if (c != -1 && c != j)
                continue;
            for (ki = 0; ki < 13; ki++)
            {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++)
            dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}

Compiler output:
a.cc:4:14: error: 'ull' does not name a type
    4 | static const ull MOD = 1000000007LL;
      |              ^~~
a.cc:8:1: error: 'uint64_t' does not name a type
    8 | uint64_t dp[100005][13];
      | ^~~~~~~~
a.cc:2:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    1 | #include <iostream>
  +++ |+#include <cstdint>
    2 | using namespace std;
a.cc:10:1: error: 'uint64_t' does not name a type
   10 | uint64_t solve()
      | ^~~~~~~~
a.cc:10:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0, i##_l = (n); i < i##_l; i++)
int dp[100001][13];
int main() {
    std::string s;STD::cin >> s;dp[0][0] = 1;REP(i, s.size())REP(j, 13) REP(k, 10)if(s[i] == '?' || s[i] - '0' == k)(dp[i + 1][(j * 10 + k) % 13] += dp[i][j]) %= 1000000007;std::cout << dp[s.size()][5];return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'STD' has not been declared
    5 |     std::string s;STD::cin >> s;dp[0][0] = 1;REP(i, s.size())REP(j, 13) REP(k, 10)if(s[i] == '?' || s[i] - '0' == k)(dp[i + 1][(j * 10 + k) % 13] += dp[i][j]) %= 1000000007;std::cout << dp[s.size()][5];return 0;
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0, i##_l = (n); i < i##_l; i++)
int dp[100001][13];
int main() {
    std::string s;cin >> s;dp[0][0] = 1;REP(i, s.size())REP(j, 13) REP(k, 10)if(s[i] == '?' || s[i] - '0' == k)(dp[i + 1][(j * 10 + k) % 13] += dp[i][j]) %= 1000000007;std::cout << dp[s.size()][5];return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     std::string s;cin >> s;dp[0][0] = 1;REP(i, s.size())REP(j, 13) REP(k, 10)if(s[i] == '?' || s[i] - '0' == k)(dp[i + 1][(j * 10 + k) % 13] += dp[i][j]) %= 1000000007;std::cout << dp[s.size()][5];return 0;
      |                   ^~~
      |                   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

typedef long long ll;
const int N = 100005;

string str;
int dp[N][13];

ll back(int pos, int mod){
	if(pos == str.size()) {
		return (mod == 5);
	}
	ll &ans = dp[pos][mod];
	if(ans != -1) return ans;
	if(str[i] != '?') return ans = back(pos+1, (mod + (str[i] - '0'))%13)%mod;
	ans = 0;
	for (int i=0; i<10; i++){
		ans = (ans + back(pos+1, (mod+i)%13))%mod;
	}
	return ans;
}

int main(){
	memset(dp, -1, sizeof dp);
	cin >> str;
	cout << back(0, 0) << endl;
}


Compiler output:
a.cc:2:13: error: expected ',' or '...' before numeric constant
    2 | #define mod 1000000007
      |             ^~~~~~~~~~
a.cc:11:22: note: in expansion of macro 'mod'
   11 | ll back(int pos, int mod){
      |                      ^~~
a.cc: In function 'll back(int, int)':
a.cc:15:30: error: cannot bind non-const lvalue reference of type 'll&' {aka 'long long int&'} to a value of type 'int'
   15 |         ll &ans = dp[pos][mod];
      |                   ~~~~~~~~~~~^
a.cc:17:16: error: 'i' was not declared in this scope
   17 |         if(str[i] != '?') return ans = back(pos+1, (mod + (str[i] - '0'))%13)%mod;
      |                ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

char S[100007];
long long int dp[100007][13];
long long int MOD=1e9+7;
int main()
{
    scanf("%s\n", S);

    dp[strlen(S)][0]=1;
    long long int r=1;
    for(int i=strlen(S)-1; i>=0; i--)
    {
        if(S[i]=='?')
        {
            for(int k=0; k<10; k++)
            {
                for(int m=0; m<13; m++)
                {
                    dp[i][(r*k%13+m)%13] += dp[i+1][m];
                    dp[i][(r*k%13+m)%13] %= MOD;
                }
            }

            r = (r*10)%13;
        }
        else
        {
            long long int d = S[i] - '0';

            for(int m=0; m<13; m++)
            {
                dp[i][(r*d%13+m)%13] += dp[i+1][m];
                dp[i][(r*d%13+m)%13] %= MOD;
            }

            r = (r*10)%13;

        }
        
    }
    
    printf("%lld\n",dp[0][5]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'strlen' was not declared in this scope
   16 |     dp[strlen(S)][0]=1;
      |        ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <functional>
  +++ |+#include <cstring>
    6 |
Language: C++

#include<cstdint>
#include<cstdio>
#include<cstring>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve () {
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] = '0';

        for(j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%lu\n", res);
    return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdint>
#include<cstdio>
#include<cstring>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve () {
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] = '0';

        for(j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdint>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve () {
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] = '0';

        for(j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}


Compiler output:
a.cc: In function 'uint64_t solve()':
a.cc:13:5: error: 'scanf' was not declared in this scope
   13 |     scanf("%s", s);
      |     ^~~~~
a.cc:14:9: error: 'strlen' was not declared in this scope
   14 |     n = strlen(s);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<cstdint>
  +++ |+#include <cstring>
    2 | 
a.cc:32:5: error: 'printf' was not declared in this scope
   32 |     printf("%llu\n", res);
      |     ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<cstdint>
  +++ |+#include <cstdio>
    2 |
Language: C++

#include<cstdio>
#include<cstdint>
#include<cstring>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

uint64_t solve () {
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] = '0';

        for(j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <stack>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <cfloat>

#define Rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())

#define eb emplace_back
#define ef emplace_front
#define dbg(x) cout<<#x" = "<<((x))<<endl
#define fs first
#define sc second
     
using namespace std;
     
     
typedef long long ll;
typedef pair<ll, ll> P;

const ll mod = 1000000007;
ll fact[200200];
ll invfact[200200];
 
inline ll take_mod(ll a){
    return (a % mod + mod) % mod;
}
 
inline ll add(ll a, ll b){
    return take_mod(a+b);
}
 
inline ll sub(ll a, ll b){
    return take_mod(a-b);
}
 
 
inline ll mul(ll a, ll b){
    return take_mod(a * b);
}
 
inline ll pow(ll x, ll n){
    ll res = 1LL;
    while(n > 0){
        if(n & 1) res = mul(res, x);
        x = mul(x, x);
        n >>= 1;
    }
    return res;
}
 
ll mod_inv(ll x){
    return pow(x, mod-2);
}
 
void make_fact(ll n){
    fact[0] = 1;
    ll res = 1;
    for(int i = 1; i <= n; i++){
        fact[i] = res;
        res = mul(res, i+1);
    }
}
 
void make_invfact(ll n){
    invfact[0] = 1;
    invfact[n] = mod_inv(fact[n]);
    for(int i = n-1; i >= 1; i--){
        invfact[i] = mul(invfact[i + 1], i + 1);
    }
}
 
ll perm(ll n, ll k){
    return mul(fact[n], invfact[n-k]);
}
 
ll comb(ll n, ll k){
    return mul(mul(fact[n], invfact[n-k]), invfact[k]);
}

int mypow(int x, int n){
  int ret = 1;
  for(int i = 0; i < n; ++i){
    ret *= x;
  }

  return ret;
}

int main(){
  string str;

  cin >> str;

#ifdef DEBUG
  cout << "str=" << str << endl;
#endif

  int N = str.length();


  ll dp[N+1][13];

  for(int i = 0; i <= N; ++i){
    for(int j = 0; j < 13; ++j){
      dp[i][j] = 0;
    }
  }

  dp[0][0] = 1;


  int mul = mypow(10, N-1);  
  for(int i = 1; i <= N; ++i){
    // cout << "stri" << str[i-1] << endl;
    if(str[i-1] == '?'){
      for(int k = 0; k <= 12; ++k){
	//cout << "k=" << k << " " << endl;
	for(int l = 0; l <= 9; ++l){
	  dp[i][(k + l*mul)%13] += dp[i-1][k];
	  dp[i][(k + l*mul)%13] = take_mod(dp[i][(k + l*mul)%13]);
	} // l
      } // k
    } else {
      for(int k = 0; k <= 12; ++k){
	int strd = str[i-1] - '0';
	dp[i][(k + strd*mul)%13] = dp[i-1][k];
	dp[i][(k + l*mul)%13] = take_mod(dp[i][(k + strd*mul)%13]);
      } // k	      
    }
    mul /= 10;
    // // ---
    // cout << endl;
    // for(int i = 0; i <= N; ++i){
    //   for(int j = 0; j < 13; ++j){
    // 	cout << dp[i][j] << " ";
    //   }
    //   cout << endl;
    // }
    // // ---
  }

  cout << dp[N][5] << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:141:20: error: 'l' was not declared in this scope
  141 |         dp[i][(k + l*mul)%13] = take_mod(dp[i][(k + strd*mul)%13]);
      |                    ^
Language: C++

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

using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;

static const ull MOD = 1000000007LL;

int main(void){
    char s[100005];
    uint64_t dp[100005][13];
    int ans = 0;
    scanf("%s", s);
    int n = strlen(s);
    dp[0][0] = 1;
    for(int i=0;i<n;i++){
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (int ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (int j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    ans = dp[n][5];
    printf("%d\n",ans);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'uint64_t' was not declared in this scope
   19 |     uint64_t dp[100005][13];
      |     ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <numeric>
  +++ |+#include <cstdint>
    6 | 
a.cc:22:13: error: 'strlen' was not declared in this scope
   22 |     int n = strlen(s);
      |             ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <numeric>
  +++ |+#include <cstring>
    6 | 
a.cc:23:5: error: 'dp' was not declared in this scope
   23 |     dp[0][0] = 1;
      |     ^~
Language: C++

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

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;

static const ull MOD = 1000000007LL;

int main(void){
    char s[100005];
    uint64_t dp[100005][13];
    int ans = 0;
    scanf("%s", s);
    int n = std::strlen(s);
    dp[0][0] = 1;
    for(int i=0;i<n;i++){
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (int ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (int j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    ans = dp[n][5];
    printf("%d\n",ans);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'uint64_t' was not declared in this scope
   20 |     uint64_t dp[100005][13];
      |     ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <numeric>
  +++ |+#include <cstdint>
    6 | 
a.cc:23:18: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   23 |     int n = std::strlen(s);
      |                  ^~~~~~
      |                  mbrlen
a.cc:24:5: error: 'dp' was not declared in this scope
   24 |     dp[0][0] = 1;
      |     ^~
Language: C++

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

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;

static const ull MOD = 1000000007LL;

int main(void){
    char s[100005];
    uint64_t dp[100005][13];
    int ans = 0;
    scanf("%s", s);
    int n = strlen(s);
    dp[0][0] = 1;
    for(int i=0;i<n;i++){
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (int ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (int j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    ans = dp[n][5];
    printf("%d\n",ans);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'uint64_t' was not declared in this scope
   20 |     uint64_t dp[100005][13];
      |     ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <numeric>
  +++ |+#include <cstdint>
    6 | 
a.cc:23:13: error: 'strlen' was not declared in this scope
   23 |     int n = strlen(s);
      |             ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <numeric>
  +++ |+#include <cstring>
    6 | 
a.cc:24:5: error: 'dp' was not declared in this scope
   24 |     dp[0][0] = 1;
      |     ^~
Language: Java

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N = S.length();
		int mod = 13;
		int mod_num = 1_000_000_007;

		int[][] mod_table = new int[N][10];
		for (int j=0;j<10;j++) {
			mod_table[0][j] = j;
		}
		for (int i=0;i<N-1;i++) {
			for (int j=0;j<10;j++) {
				mod_table[i+1][j]=mod_table[i][j]*10%mod;
			}
		}

		int[] dp = new int[13];
		dp[0] = 1;
		for (int i=N-1;i>=0;i--) {
			int[] next_dp = new int[13];
			if (S.charAt(i) == '?') {
				for (int l=0;l<10;l++) {
					int k = l;
					for (int j=0;j<mod;j++) {
						next_dp[(mod_table[N-i-1][k] + j)%mod] += dp[j];
						next_dp[(mod_table[N-i-1][k] + j)%mod] %= mod_num;
					}
				}
			} else {
				int k = (int)S.charAt(i) - 48;
				for (int j=0;j<mod;j++) {
					next_dp[(mod_table[N-i-1][k] + j)%mod] += dp[j];
					next_dp[(mod_table[N-i-1][k] + j)%mod] %= mod_num;
				}
			}
			dp = next_dp;
		}
		// System.out.println(N);
		System.out.println(Arrays.toString(dp[6]));
		// System.out.println(Arrays.deepToString(mod_table));
	}
}

Compiler output:
Main.java:43: error: no suitable method found for toString(int)
		System.out.println(Arrays.toString(dp[6]));
		                         ^
    method Arrays.toString(long[]) is not applicable
      (argument mismatch; int cannot be converted to long[])
    method Arrays.toString(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    method Arrays.toString(short[]) is not applicable
      (argument mismatch; int cannot be converted to short[])
    method Arrays.toString(char[]) is not applicable
      (argument mismatch; int cannot be converted to char[])
    method Arrays.toString(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    method Arrays.toString(boolean[]) is not applicable
      (argument mismatch; int cannot be converted to boolean[])
    method Arrays.toString(float[]) is not applicable
      (argument mismatch; int cannot be converted to float[])
    method Arrays.toString(double[]) is not applicable
      (argument mismatch; int cannot be converted to double[])
    method Arrays.toString(Object[]) is not applicable
      (argument mismatch; int cannot be converted to Object[])
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

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

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;

static const ull MOD = 1000000007LL;

int main(void){
    char s[100005];
    uint64_t dp[100005][13];
    int ans = 0;
    scanf("%s", s);
    int n = strlen(s);
    dp[0][0] = 1;
    for(int i=0;i<n;i++){
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (int ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (int j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    ans = dp[n][5];
    printf("%lld\n",ans);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'uint64_t' was not declared in this scope
   20 |     uint64_t dp[100005][13];
      |     ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <numeric>
  +++ |+#include <cstdint>
    6 | 
a.cc:23:13: error: 'strlen' was not declared in this scope
   23 |     int n = strlen(s);
      |             ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <numeric>
  +++ |+#include <cstring>
    6 | 
a.cc:24:5: error: 'dp' was not declared in this scope
   24 |     dp[0][0] = 1;
      |     ^~
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;


void solve(){
	string S; cin >> S;
	ll dp[100005][13];
	int n = S.size();
	dp[0][0] = 1;

	rep(i,n){
		int s;
		if(S[i]=='?') s = -1;
		else s = S[i] - '0';

		rep(j,10){
			if(s!=-1 && s!=j) continue;
			rep(k,13){
				dp[i+1][(k*10+j)%13] += dp[i][k];
                dp[i+1][(k*10+j)%13] %= MOD
			}
		}

		rep(j,13) dp[i+1][j] %= MOD;
	}
	cout << dp[n][5] << endl;
}


signed main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:54:25: error: expected ';' before '}' token
   54 |                         }
      |                         ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <stack>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <cfloat>

#define Rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())

#define eb emplace_back
#define ef emplace_front
#define dbg(x) cout<<#x" = "<<((x))<<endl
#define fs first
#define sc second
     
using namespace std;
     
     
typedef long long ll;
typedef pair<ll, ll> P;

const ll mod = 1000000007;
ll fact[200200];
ll invfact[200200];
 
inline ll take_mod(ll a){
    return (a % mod + mod) % mod;
}
 
inline ll add(ll a, ll b){
    return take_mod(a+b);
}
 
inline ll sub(ll a, ll b){
    return take_mod(a-b);
}
 
 
inline ll mul(ll a, ll b){
    return take_mod(a * b);
}
 
inline ll pow(ll x, ll n){
    ll res = 1LL;
    while(n > 0){
        if(n & 1) res = mul(res, x);
        x = mul(x, x);
        n >>= 1;
    }
    return res;
}
 
ll mod_inv(ll x){
    return pow(x, mod-2);
}
 
void make_fact(ll n){
    fact[0] = 1;
    ll res = 1;
    for(int i = 1; i <= n; i++){
        fact[i] = res;
        res = mul(res, i+1);
    }
}
 
void make_invfact(ll n){
    invfact[0] = 1;
    invfact[n] = mod_inv(fact[n]);
    for(int i = n-1; i >= 1; i--){
        invfact[i] = mul(invfact[i + 1], i + 1);
    }
}
 
ll perm(ll n, ll k){
    return mul(fact[n], invfact[n-k]);
}
 
ll comb(ll n, ll k){
    return mul(mul(fact[n], invfact[n-k]), invfact[k]);
}

int mypow(int x, int n){
  int ret = 1;
  for(int i = 0; i < n; ++i){
    ret *= x;
  }

  return ret;
}

int main(){
  string str;

  cin >> str;

#ifdef DEBUG
  cout << "str=" << str << endl;
#endif

  int N = str.length();


  ll dp[N+1][13];

  for(int i = 0; i <= N; ++i){
    for(int j = 0; j < 13; ++j){
      dp[i][j] = 0;
    }
  }

  dp[0][0] = 1;

  for(int i = 1; i <= N; ++i){
    // cout << "stri" << str[i-1] << endl;
    
    if(str[i-1] == '?'){
      for(int k = 0; k <= 12; ++k){
	//cout << "k=" << k << " " << endl;
	for(int l = 0; l <= 9; ++l){
	  int index = (k-l*mypow(10, N-i))%13;
	  if(index < 0) index += 13;
	  dp[i][k] = add(dp[i][k], dp[i-1][index]);
	} // l
      } // k
    } else {
      for(int k = 0; k <= 12; ++k){
	int strd = str[i-1] - '0';
	//cout << "strd=" << strd << endl;
	int index = (k - (strd * mypow(10, N-i) ) % 13) % 13;
	if(index < 0) index += 13;
	dp[i][k] = dp[i-1][index];
      } // k	      
    }

    // // ---
    // cout << endl;
    // for(int i = 0; i <= N; ++i){
    //   for(int j = 0; j < 13; ++j){
    // 	cout << dp[i][j] << " ";
    //   }
    //   cout << endl;
    // }
    // // ---
  }

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

static const ull MOD = 1000000007LL;

int n;
 char s[100005];
 uint64_t dp[100005][13];

 uint64_t solve () {
   int i, j, ki;
 uint64_t res = 0;
 scanf("%s", s);
 n = strlen(s);

 dp[0][0] = 1;
 for (i = 0; i < n; i++) {
 int c;
 if (s[i] == '?') c = -1;
 else c = s[i] - '0';

 for (j = 0; j < 10; j++) {
 if (c != -1 && c != j) continue;
 for (ki = 0; ki < 13; ki++) {
 dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
 }
}
for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
 }
 res = dp[n][5];

printf("%llu\n", res);
return 0;}

Compiler output:
a.cc:1:14: error: 'ull' does not name a type
    1 | static const ull MOD = 1000000007LL;
      |              ^~~
a.cc:5:2: error: 'uint64_t' does not name a type
    5 |  uint64_t dp[100005][13];
      |  ^~~~~~~~
a.cc:1:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | static const ull MOD = 1000000007LL;
a.cc:7:2: error: 'uint64_t' does not name a type
    7 |  uint64_t solve () {
      |  ^~~~~~~~
a.cc:7:2: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>

using namespace std;
vector<long long int> bo;
long long int tmp;

void cal(long long int x, long long int y){

	for(long long int j=0;j<13;j++){
		for(long long int i=0;i<10;i++){
			tmp=(x*i)%13;
			bo[tmp]=*x;
		}
	}
}

int main(){

	long long int sz, lest=0;
	string s;
	vector<int> v(13, 0);

	cin>> s;
	sz=s.size();

	for(int i=sz-1;i>=0;i--){
		if(s[i]=='?'){
			if((sz-i)%6==1) v[1]++;
			if((sz-i)%6==2) v[10]++;
			if((sz-i)%6==3) v[9]++;
			if((sz-i)%6==4) v[12]++;
			if((sz-i)%6==5) v[3]++;
			if((sz-i)%6==0) v[4]++;
		}else{
			if((sz-i)%6==1) lest+=s[i];
			if((sz-i)%6==2) lest+=s[i]*10;
			if((sz-i)%6==3) lest+=s[i]*9;
			if((sz-i)%6==4) lest+=s[i]*12;
			if((sz-i)%6==5) lest+=s[i]*3;
			if((sz-i)%6==0) lest+=s[i]*4;
		}
	}
	lest=lest%13;
	bo[lest]=1;

	cal(1, v[1]);
	cal(10, v[10]);
	cal(9, v[9]);
	cal(12, v[12]);
	cal(3, v[3]);
	cal(4, v[4]);

	//cout<< n%13 << endl;

	

}

Compiler output:
a.cc: In function 'void cal(long long int, long long int)':
a.cc:16:33: error: invalid type argument of unary '*' (have 'long long int')
   16 |                         bo[tmp]=*x;
      |                                 ^~
Language: C++

#include<iostream>
#include<iomanip>

#include<vector>
#include<queue>
#include<set>
#include<map>
#include<string>

#include<algorithm>
#include<cmath>
#include<cstdlib>

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 long long INF = 1LL << 60;
typedef pair<int, int> P;

/*
13で割って5余る・・・
ユークリッド

常識的に言って、
0~10000までの中で13で割って5余る数って言ったら
10000 / 13 の値がだいたい相当する

保留

i文字までで13で割って5余る数dp[i]
 */

int dp[100000][13];

int main() {
    string s;
    cin >> s;
    int n = s.size();
    int div = 1e9+7;

    dp[n][0] = 1;

    int r = 1;
    for (int i = 0; i < n; i++) {
        if (s[i] == '?') {
            for (int j = 0; j < 13; j++) {
                for (int k = 0; k < 10; k++) {
                    int tmp = k * r;
                    dp[i][(j+tmp)%13] = (dp[i][(j+tmp)%13] + dp[i+1][j]) % div;
                }

            }
        } else {
            int k = atoi(s[i]);
            for (int j = 0; j < 13; j++) {
                int tmp = k * r;
                    dp[i][(j+tmp)%13] = (dp[i][(j+tmp)%13] + dp[i+1][j]) % div;
            }
        }
        r = (r * 10) % 13;
    }
    cout << dp[0][5] % div << "\n";
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   55 |             int k = atoi(s[i]);
      |                     ~~~~^~~~~~
      |                         |
      |                         __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 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/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
#include<string.h>

void keinazo(int,int);
void keikazu(int,int,int);


int N;
long dp[13][100001];

int main(void){
    char S[100001];

    int i,j;
    for(i=0;i<13;i++){
        for(j=1;j<100001;j++){
            dp[i][j]=0;
        }
    }

    scanf("%s",S);

    N=strlen(S);

    if(S[N-1]=='?'){
        for(i=0;i<10;i++){
            dp[i][1]=1;
        }
    }else{
        int base=S[N-1]-'0';
        dp[base][1]=1;
    }

    int p=10;

    for(i=N-2;i>=0;i++){
        if(S[i]=='?'){
            keinazo(N-i,p);
        }else{
            int ba=S[i]-'0';
            keikazu(N-i,p,ba);
        }
        p*=10;
        p%=13;
    }

    printf("%ld",dp[5][N]);

    return 0;
}

void keinazo(int n,int p){
    int i,j;

    for(i=1;i<10;i++){
        for(j=0;j<13;j++){
            dp[(j+p*i)%13][n]+=dp[j][n-1];
        }
    }
    for(i=0;i<13;i++){
        dp[i][n]%=1000000007;
    }

    return;
}

void keikazu(int n,int p,int base){
    int i;
    for(i=0;i<13;i++){
        dp[(i+p*ba)%13][n]+=dp[i][n-1];
        dp[(i+p*ba)%13][n]%=1000000007;
    }
    return;
}

Compiler output:
main.c: In function 'keikazu':
main.c:70:17: error: 'ba' undeclared (first use in this function)
   70 |         dp[(i+p*ba)%13][n]+=dp[i][n-1];
      |                 ^~
main.c:70:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
#include<cstdio>
#define ll long long int

using namespace std;

int main(){
    string s;
    cin >> s;
    int i,j;
    ll ans=1;

    vector<pair<int,int>> n;

    ll ts=0;
    bool on=false;
    i=1;
    while(s[i]!='\0'){
        if(s[i]=='?'){
            ts++;
        }
    }
    if(s[0]=='?'){
        ans=9;
    }

    ans=ans*pow(10,ts)%(pow(10,9)+5);

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   27 |     ans=ans*pow(10,ts)%(pow(10,9)+5);
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
      |            |                     |
      |            |                     __gnu_cxx::__promote<double>::__type {aka double}
      |            __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
#include<iomanip>

#include<vector>
#include<queue>
#include<set>
#include<map>
#include<string>

#include<algorithm>
#include<cmath>
#include<cstdlib>

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 long long INF = 1LL << 60;
typedef pair<int, int> P;

/*
13で割って5余る・・・
ユークリッド

常識的に言って、
0~10000までの中で13で割って5余る数って言ったら
10000 / 13 の値がだいたい相当する

保留

i文字までで13で割って5余る数dp[i]
 */

int dp[100000][13];

int main() {
    string s;
    cin >> s;
    int n = s.size();
    int div = 1e9+7;

    dp[n][0] = 1;

    int r = 1;
    for (int i = 0; i < n; i++) {
        if (s[i] == '?') {
            for (int j = 0; j < 13; j++) {
                for (int k = 0; k < 10; k++) {
                    int tmp = k * r;
                    dp[i][(j+tmp)%13] = (dp[i][(j+tmp)%13] + dp[i+1][j]) % div;
                }

            }
        } else {
            int k = stoi(s[i]);
            for (int j = 0; j < 13; j++) {
                int tmp = k * r;
                    dp[i][(j+tmp)%13] = (dp[i][(j+tmp)%13] + dp[i+1][j]) % div;
            }
        }
        r = (r * 10) % 13;
    }
    cout << dp[0][5] % div << "\n";
    
}


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

N=input()
a=1000000000+7
b=[]
for i in N:
    if i=='?':b.append(9)
    else:b.append(i)
b=int(b)
print((b-5)/13)

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

#include<bits/stdc++.h>
using namespace std;
int main () {
  string S;
  cin >> S;
  char key[] = {'0','1','2','3','4','5','6','7','8','9'}
  int N = S.size();
  int ans[100002][13];//ans[i][j] = i番目まで処理、余りがjの個数(mod 1e9 + 7)
  int k = 5;
  vector<int>th();
  int num[100003];
  int n[] = {1, 10, 9, 12, 3, 4};
  for (int i = 0; i < 100003; i ++) {
    num[i] = n[i % 6];
  }
  for (int i = N - 1; i >= 0; i --) {
    char a = S[i];
    if (a == '?') {
      th.push_back(num[i]);
    }
    else {
      for (int j = 0; j < 10; j ++) {
        if (a == key[j]) {
          k -= j * num[i];
          k += 169;
          k %= 13;
        }
      }
    }
  }
  for(int i = 0; i < 13; i ++) ans[0][i] = 0;
  ans[0][0] = 1;
  for (int i = 0; i < th.size(); i ++) {
    for (int j = 0; j < 13; j ++) {
      for (int l = 0; l < 13; l ++) {
        int m = th[i] * j + l;
        m %= 13;
        ans[i + 1][m] += ans[i][l];
        pre[i + 1][m] %= 13;
      }
    }
  }
  cout << ans[th.size()][k];
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'int'
    7 |   int N = S.size();
      |   ^~~
a.cc:10:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   10 |   vector<int>th();
      |                ^~
a.cc:10:16: note: remove parentheses to default-initialize a variable
   10 |   vector<int>th();
      |                ^~
      |                --
a.cc:16:16: error: 'N' was not declared in this scope
   16 |   for (int i = N - 1; i >= 0; i --) {
      |                ^
a.cc:19:10: error: request for member 'push_back' in 'th', which is of non-class type 'std::vector<int>()'
   19 |       th.push_back(num[i]);
      |          ^~~~~~~~~
a.cc:33:26: error: request for member 'size' in 'th', which is of non-class type 'std::vector<int>()'
   33 |   for (int i = 0; i < th.size(); i ++) {
      |                          ^~~~
a.cc:36:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   36 |         int m = th[i] * j + l;
      |                     ^
a.cc:36:23: error: invalid operands of types 'std::vector<int>()' and 'int' to binary 'operator*'
   36 |         int m = th[i] * j + l;
      |                 ~~~~~ ^ ~
      |                     |   |
      |                     |   int
      |                     std::vector<int>()
a.cc:39:9: error: 'pre' was not declared in this scope; did you mean 'pread'?
   39 |         pre[i + 1][m] %= 13;
      |         ^~~
      |         pread
a.cc:43:18: error: request for member 'size' in 'th', which is of non-class type 'std::vector<int>()'
   43 |   cout << ans[th.size()][k];
      |                  ^~~~
Language: C++

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

typedef long long ll;

const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

string S;
mint dp[100005][13];
bool q[100005];
int mod13[] = {1, 10, 9, 12, 3, 4};

int s2i(char c) {
  return ((c-'0')==15 ? -1 : c-'0');
}

int mod13_pad(int i) {
  return mod13[i%6];
}

void solve(int N, int remain) {
  int cnt=0;
  /* rep(i, 10) { */
  /*   dp[0][i] = 1; */
  /* } */
  rep(i, N) {
    if(!q[i]) continue;
    if(cnt==0) {
      rep(j, 10) {
        dp[0][(mod13_pad(N-i-1)*j)%13] += 1;
      }
    } else {
      rep(j, 10) {
        rep(k, 13) {
          dp[cnt][(k+(mod13_pad(N-i-1)*j))%13] += dp[cnt-1][k];
        }
      }
    }
    cnt++;
  }
  cout << dp[cnt-1][remain].x << endl;
}

int main() {
  cin >> S;
  int N = S.size();
  int sum=0;
  bool q_flag=true;
  rep(i, N) {
    int x=s2i(S[i]);
    if(x==-1) q[i]=true; q_flag=true;
    else sum+=x*mod13_pad(N-i-1);
  }
  sum = sum%13;
  int remain=(18-sum)%13;
  solve(N, remain);
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:100:5: error: 'else' without a previous 'if'
  100 |     else sum+=x*mod13_pad(N-i-1);
      |     ^~~~
Language: C++

# 153716888
MOD = (10**9) + 7
s = gets.chomp
l = s.size
m = 13
dp = Array.new(l+1) { Array.new(13) {0} }
dp[0][0] = 1
dma = [1, 10, 9, 12, 3, 4]
hatena = '?'
l.times do |i|
  b = dma[(l-1-i)%6]
  if s[i] == hatena
    10.times do |k|
      m.times do |j|
        dp[i+1][j] = (dp[i+1][j] + dp[i][(j+k*b)%m])%MOD
      end
    end
  else
    k = s[i].to_i
    m.times do |j|
      dp[i+1][j] = dp[i][(j+k*b)%m]%MOD
    end
  end
end
p dp[l][8]

Compiler output:
a.cc:153716888:1: error: 'MOD' does not name a type
a.cc:153716893:1: error: 'dp' does not name a type
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 100100100;

int main() {
    //ll N; cin >> N;
    //ll N,M; cin >> N >> M;
    string S; cin >> S;
    //ll H,W; cin >> H >> W;
    int N;
    N=S.length();
    int nu[N][13];
    for(int i=0;i<13;i++){
        for(int j=0;j<N;j++){
            nu[j][i]=0;
        }
    }
  	int p;
    if(S[0]=='?'){
        int dig=(N-1)%6;
      	p=pow(10,dig);
      	p=p%13;
      	for(int i=0;i<10;i++){
          nu[0][(j*p)%13]++;
        }
    }
    else{
        int x=S[0]-'0';
        int dig=(N-1)%6;
        p=pow(10,dig);
        p=p%13;
        nu[0][(x*p)%13]++;
    }
    for(int i=1;i<N;i++){
        int dig=(N-i-1)%6;
        p=pow(10,dig);
        p=p%13;
        if(S[i]=='?'){
            for(int j=0;j<10;j++){
                for(int k=0;k<13;k++){
                    nu[i][(k+p*j)%13]+=nu[i-1][k];//ココアyたしい
                  	nu[i][(k+p*j)%13]=nu[i][(k+p*j)%13]%mod;
                }
            }
        }
        else{
            int x=S[i]-'0';
            for(int j=0;j<13;j++){
                nu[i][(j+p*x)%13]+=nu[i-1][j];
              	nu[i][(j+p*x)%13]=nu[i][(j+p*x)%13]%mod;
            }
        }
    }
  	nu[N-1][5]=nu[N-1][5]%13;
    cout << nu[N-1][5];
}

/*

観自在菩薩・行深般若波羅蜜多時、照見五蘊皆空、度一切苦厄。舎利子。色不異空、空不異色、色即是空、空即是色。受・想・行・識・亦復如是。舎利子。是諸法空相、不生不滅、不垢不浄、不増不減。是故空中、無色、無受・想・行・識、無眼・耳・鼻・舌・身・意、無色・声・香・味・触・法。無眼界、乃至、無意識界。無無明・亦無無明尽、乃至、無老死、亦無老死尽。無苦・集・滅・道。無智、亦無得。以無所得故、菩提薩埵、依般若波羅蜜多故、心無罜礙、無罜礙故、無有恐怖、遠離・一切[注 6]・顛倒夢想、究竟涅槃。三世諸仏、依般若波羅蜜多故、得阿耨多羅三藐三菩提。故知、般若波羅蜜多、是大神呪、是大明呪、是無上呪、是無等等呪、能除一切苦、真実不虚。故説、般若波羅蜜多呪。
即説呪曰、羯諦羯諦、波羅羯諦、波羅僧羯諦、菩提薩婆訶。般若心経

 */



Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: 'j' was not declared in this scope
   26 |           nu[0][(j*p)%13]++;
      |                  ^
Language: C++

#include  <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define inf 1000000007
//P pa(114,514);   ,vector<P>vec(N,0);
//vector<vector<int>> vec(縦, vector<int>(横));
#define REP(i,N) for(int i=0;i<N;i++)
int gcd(int a, int b) {
    if(a>b){
        swap(a,b);
        }
    while(b%a!=0){
        b%=a;
        swap(a,b);
    }
    return a;
}
//cout << setprecision(123);
//a=atoi(S.c_str());
//S=to_string(a);
int main(){
  string S,ss;
  cin>>S;
  int N=S.size(),M;
  ll ans=0,a;
  vector<int>v;
  REP(i,N){
    if(S[i]=='?'){
      v.push_back(i);
    }
  }
  M=v.size();
  
  REP(i,pow(10,M)){
    ss=to_string(i);
    REP(j,M){
      S[v[j]]=ss[v[j]];
    }
      a=atoi(S.c_str());
    if((a-5)%13==0){
      ans++;
      i+=12;
  }
    
  
  
  cout<<ans%inf<<endl;
}

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

#include<bits/stdc++.h>
using namespace std ;
typedef long long ll; 
ll mod = 1e9 + 7 ;
int main () {
  
  int N ;
  string s ;
  cin >> s ;
  N = (int)s.size() ;
  reverse(s.begin(),s.end()) ;
  int dp[N][13] ;
  for(int j = 0 ; j < N ;j++
 	 for(int i = 0 ; i < 13 ;i++)
   	 	dp[j][i] = 0 ;
  if(s[0]=='?'){
    for(int i =0 ; i < 10 ;i++)
      dp[0][i] = 1 ;
  }
  ll pw = 1LL ;
  for(int i = 1 ; i < N ;i++){
    pw = (pw  * 10) %mod ;
    if(s[i] == '?'){
      for(int j = 0 ; j < 10 ;j++)
        for(int k = 0 ; k < 13 ;k++)
          dp[i][(k + j*pw)%13]=(dp[i][(k + j*pw)%13] + dp[i - 1][k])%mod ; 
    }
    else {
      for(int j =0 ; j < 13 ;j++)
        dp[i][(j + (s[i]-'0')*pw)%13]=(dp[i][(j + (s[i]-'0')*pw)%13] + dp[i - 1][j])%mod ;
    }
  }
  cout<<dp[N - 1][5]<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: expected ')' before 'for'
   13 |   for(int j = 0 ; j < N ;j++
      |      ~                      ^
      |                             )
   14 |          for(int i = 0 ; i < 13 ;i++)
      |          ~~~