criyle/codenet-compile-errors huggingface dataset:
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:1: 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:1: error: 'uint64_t' does not name a type
    7 | uint64_t solve () {
      | ^~~~~~~~
a.cc:7:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
Language: C++

#include <sys/time.h>

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <utility>
#include <cctype>

using namespace std;

using ll = long long;
using P = pair<double, double>;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define mkp(a, b) make_pair(a, b)
ll mod = 1000000007LL;



int main() {
	string s;
	cin >> s;
	int size = s.size();
	vector<ll> dp(13, 0);
	dp[0] = 1;

	for(char c : s) {
		vector<ll> ndp(13, 0);
		rep(i, 10) if (c == '?' || c - '0' == i) rep(j, 13) {
			int d  = (j * 10 + i) % 13;
			ndp[d] = dp[j] + ndp[d];
			ndp[k] %= mod; 
		}
		dp = move(ndp);
	}


	cout << dp[5] << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:29: error: 'k' was not declared in this scope
   41 |                         ndp[k] %= mod;
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using pint = pair<int,int>;
using vec = vector<int>;
using ll=long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;


int mod = 1e9+ 7;

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

    int len = s.size();

    reverse(s.begin(),s.end());

    int dp[110000][13];

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

    int num = 1;
    for(int i= 1; i<len; i++){
        num *=10;
        num %=13;
        if(s[i]=='?'){
            rep(j, 10){
                rep(k, 13){
                    int index = (j*num + k)%13;
                    dp[i][index] += dp[i - 1][k];
                    dp[i][index] %mod;
                }
            }

        }else{
            rep(k,13){
                int j = (s[i]-'0');
                int index = (j*num+k)%13;
                dp[i][index] += dp[i - 1][k];
                dp[i][index] %mod;
            }

        }

    }

    cout<< dp[len -1][5]<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:64:32: error: expected '}' at end of input
   64 |     cout<< dp[len -1][5]<<endl;
      |                                ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<map>
#include<set>
#include<vector>
using namespace std;
#define ll long long 
#define mod 1000000007

string s;
int dp[100009][13];

int solve(int idx, int sum) {
	// cout<<idx<<" "<<sum<<endl;
	if(idx == s.length())
		return sum == 5;

	if(dp[idx][sum] != -1) 
		return dp[idx][sum];
	

	int sm = sum;
	int ans = 0;

	sum *= 10;
	if(s[idx] != '?') {
		sum += (s[idx] - '0');
		sum %= 13;
		ans += solve(idx + 1, sum);
		ans %= mod;
	} else {
		for(int i = 0; i <= 9; i++){
			int ssum = sum;
			ssum += i;
			ssum %= 13;
			ans += solve(idx + 1, ssum);
			ans %= mod;
		}
	}

	return dp[idx][sm] = ans%mod;
}


int main() {
	memset(dp, -1, sizeof(dp));
	cin>>s;
	cout<<solve(0, 0)<<endl;;

}


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

#include <bits/stdc++.h>
using namespace std;
const long long int mod=1e9+7;
long long int dp[100005][13];
int main(){
  string S;
  cin >> S;
  if(S[i]!='?')dp[0][(S[0]-'0')]++;
  else for(int k=0;k<10;k++)dp[0][k]++;
  for(int i=1;i<S.length();i++){
    for(int j=0;j<13;j++){
      if(S[i]!='?'){
        dp[i][((j*10)%13+(S[i]-'0')%13)%13]+=dp[i-1][j];
        dp[i][((j*10)%13+(S[i]-'0')%13)%13]%=mod;
      }
      else{
        for(int k=0;k<10;k++){
          dp[i][((j*10)%13+k%13)%13]+=dp[i-1][j];
          dp[i][((j*10)%13+k%13)%13]%=mod;
        }
      }
    }
  }
  cout << dp[S.length()-1][0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   if(S[i]!='?')dp[0][(S[0]-'0')]++;
      |        ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//マクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size())      //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000 //10^12
#define MOD 10000007      //10^9+7
#define PB push_back
#define MP make_pair
#define F first
#define S second

#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
static const ull MOD = 1e9 + 7;

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



int main(int argc, char const *argv[])
{


    REP(i,n) 
    {
        int tmp;
        if (s[i] == '?') {
            tmp = -1;
        } else
        {
            tmp = s[i] - '0';
        }

        REP(j,10)
        {
            if (tmp != -1 && tmp != j) 
            {
                continue;
            }

            REP(k,13) 
            {
                dp[i+1][(10*k+j)%13] += dp[i][k];
            }

            REP(k,13) dp[i+1][k] %= MOD;
        }
    }
    cout << dp[n][5] << "\n";

    return 0;
}


Compiler output:
a.cc:16:13: error: expected unqualified-id before numeric constant
   16 | #define MOD 10000007      //10^9+7
      |             ^~~~~~~~
a.cc:25:18: note: in expansion of macro 'MOD'
   25 | static const ull MOD = 1e9 + 7;
      |                  ^~~
Language: C++

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

int main() {
    string s;cin>>s;
    int n=s.size();
    int mod=1e9+7;
    ll dp[n+1][13]{};
    dp[0][0]=1;
    for (int i=0;i<n;i++) {
        for (int j=0;j<13;j++)
            for (int k=0;k<=9;k++)
                if (s[i]=='?'||s[i]-'0'==k)
                    dp[i+1][(j*10+k)%13]=(dp[i+1][(j*10+k)]+dp[i][j])%mod;
    cout<<dp[n][5]<<endl;
    return 0;
}

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

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

int main(){
  string st;
  cin>>st;
  int n=st.size();
  ll dp[100050][13], mod=1e9+7;
  if(st[0]!='?')
    dp[0][st[0]-'0']=1;
  }else{
    rep(i,10)
      dp[0][i]=1;
  }
  int c;
  for(int i=1; i<n; i++){
    if(st[i]!='?') c=st[i]-'0';
    else c=-1;
    
    for(int j=0; j<10; j++){
      if(c!=-1&& c!=j) continue;
      for(int k=0; k<13; k++){
        dp[i][(k*10+j)%13]+=dp[i-1][k];
      }
    }
   for(int j=0; j<13; j++)
     dp[i][j]%=mod;
  }
  cout<<dp[n-1][5]<<endl;;
    
    
  
    
}

Compiler output:
a.cc:16:4: error: expected unqualified-id before 'else'
   16 |   }else{
      |    ^~~~
a.cc:21:3: error: expected unqualified-id before 'for'
   21 |   for(int i=1; i<n; i++){
      |   ^~~
a.cc:21:16: error: 'i' does not name a type
   21 |   for(int i=1; i<n; i++){
      |                ^
a.cc:21:21: error: 'i' does not name a type
   21 |   for(int i=1; i<n; i++){
      |                     ^
a.cc:34:3: error: 'cout' does not name a type
   34 |   cout<<dp[n-1][5]<<endl;;
      |   ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

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

int main(){
  string st;
  cin>>st;
  int n=st.size();
  ll dp[100050][13], mod=1e9+7;
  dp[0][st[0]-'0']=1;
  rep(i,13){
    if(i!=st[0]-'0')  dp[0][i]=0;
  }
  int c;
  for(int i=1; i<n; i++){
    if(st[i]!=?) c=st[i]-'0';
    else c=-1;
    
    for(int j=0; j<10; j++){
      if(c!=-1&& c!=j) continue;
      for(int k=0; k<13; k++){
        dp[i][(k*10+j)%13]+=dp[i-1][k];
      }
    }
    for(int j=0; j<13; j++)
      dp[i][j]%=mod;
  }
  cout<<dp[n-1][5];
    
    
  
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: expected primary-expression before '?' token
   20 |     if(st[i]!=?) c=st[i]-'0';
      |               ^
a.cc:20:16: error: expected primary-expression before ')' token
   20 |     if(st[i]!=?) c=st[i]-'0';
      |                ^
a.cc:20:16: error: expected ':' before ')' token
   20 |     if(st[i]!=?) c=st[i]-'0';
      |                ^
      |                :
a.cc:20:16: error: expected primary-expression before ')' token
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:2:14: error: 'ull' does not name a type
    2 | static const ull MOD = 1000000007LL;
      |              ^~~
a.cc:5:1: 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 | 
a.cc:6:1: error: 'uint64_t' does not name a type
    6 | uint64_t solve () { int i, j, ki; uint64_t res = 0;
      | ^~~~~~~~
a.cc:6: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 < (int)(n); i++)
#include <iostream>
typedef long long ll;
using namespace std;


int main() {
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: In function 'int main()':
a.cc:9:14: error: 'ull' does not name a type; did you mean 'll'?
    9 | static const ull MOD = 1000000007LL;
      |              ^~~
      |              ll
a.cc:13:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   13 | uint64_t solve () { int i, j, ki; uint64_t res = 0;
      |                ^~
a.cc:13:16: note: remove parentheses to default-initialize a variable
   13 | uint64_t solve () { int i, j, ki; uint64_t res = 0;
      |                ^~
      |                --
a.cc:13:16: note: or replace parentheses with braces to value-initialize a variable
a.cc:13:19: error: a function-definition is not allowed here before '{' token
   13 | uint64_t solve () { int i, j, ki; uint64_t res = 0;
      |                   ^
a.cc:27:12: error: expected '}' at end of input
   27 | return 0; }
      |            ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
using ll = long long;
using P = pair<int, int>;
#include<algorithm>
#include<math.h>
#include<map>
#include<queue>

int main() {
	string s;
	cin >> s;
	ll dp[13] = {};
	ll n = s.size();
	//cout << n;
	int mul = 1;
	ll mod = 1000000007;
	dp[0] = 1;
	for (int i = n - 1; i >= 0; --i) {
		ll ndp[13] = {};
		char c = s[i];
		if (c == '?') {
			for (int k = 0; k < 10; ++k) {
				for (int j = 0; j < 13; ++j) {
					ndp[(k * mul + j) % 13] += dp[j];//k*mulの余りだけ、dp[j]を平行移動する
					ndp[(k * mul + j) % 13] %= mod;
				}
			}
		}
		else {
			int k = (int)(s[i] - '0');
			//cout << k;
			for (int j = 0; j < 13; ++j) {
				ndp[(k * mul + j) % 13] += dp[j];//k*mulの余りだけ、dp[j]を平行移動する
				ndp[(k * mul + j) % 13] %= mod;
			}
		}
		mul *= 10;
		mul %= 13;
		//cout << endl;
		memcpy(dp, ndp, sizeof(dp));
		/*rep(i, 13) {
			cout << dp[i]<<" ";
		}
		cout << endl;
		*/
	}
	cout << dp[5];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:17: error: 'memcpy' was not declared in this scope
   43 |                 memcpy(dp, ndp, sizeof(dp));
      |                 ^~~~~~
a.cc:11:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include<queue>
  +++ |+#include <cstring>
   11 |
Language: C

#include <iostream>
using namespace std;

#define MOD 1000000007

typedef long long ll;

string s;
ll dp[111111][13], cycle[6] = {1, 10, 9, 12, 3, 4};
/* Find about "cycle" in "https://en.wikipedia.org/wiki/Divisibility_rule#Divisibility_by_13" */

int main(void)
{
	ll i, j, k;

	cin >> s;

	dp[s.size()][0] = 1;
	for (i = s.size() - 1; i >= 0; i--)
		if (s[i] != '?')
		{
			ll rmd = (s[i] - '0') * cycle[(s.size() - 1 - i) % 6] % 13;

			for (k = 0; k < 13; k++)
			{
				ll now = (k + rmd) % 13;
				dp[i][now] = (dp[i][now] + dp[i + 1][k]) % MOD;
			}
		}
		else
		{
			for (j = 0; j < 10; j++)
			{
				ll rmd = j * cycle[(s.size() - 1 - i) % 6] % 13;

				for (k = 0; k < 13; k++)
				{
					ll now = (k + rmd) % 13;
					dp[i][now] = (dp[i][now] + dp[i + 1][k]) % MOD;
				}
			}
		}

	cout << dp[0][5];
	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;

// Type alias
using ll=long long;
using ld=double;

using pi=pair<int,int>;
using pll=pair<ll,ll>;
using pld=pair<ld,ld>;
using ti3=tuple<int, int, int>;

using vi=vector<int>;
using vll=vector<ll>;
using vld=vector<ld>;
using vpi=vector<pi>;
using vpll=vector<ll>;
using vpld=vector<ld>;
using vti3=vector<ti3>;

// Constants
const double EPS = 1e-9;
const int inf = numeric_limits<int>::max() / 2;
const ll mod = 1e9+7;

// Macro
#define rep(i,n) for(int i=0;i<int(n);++i)
#define rrep(i,n) for(int i=int(n-1);i>=0;--i)
#define REP(i,a,b) for(int i=int(a);i<int(b);++i)
#define RREP(i,a,b) for(int i=int(b-1);i>=int(a);--i)
#define SHOW(a) cout << #a << " = " << a << endl
#define ARR(a,n) for(int i=0;i<int(n);++i) cout << #a << "[" << i << "]" << " = " << a[i] << endl

#define ALL(a) a.begin(),a.end()

// Funtcions
ll pow(ll base, ll i, ll mod){
  ll a = 1;
  while(i){
    if (i & 1) {
      a *= base;
      a %= mod;
    }
    base *= base;
    base %= mod;
    i >>= 1;
  }
  return a;
}
ll gcd(ll a, ll b){
  while(b){
    ll c = a % b;
    a = b;
    b = c;
  }
  return a;
}
ll lcm(ll a, ll b){
  return a / gcd(a, b) * b;
}
template<typename T> bool chmin(T& a, const T& b) {
  if (a > b) return a = b, true; else return false;
}

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

uint64_t dp[1e5+5][13];

void solve(){
  string s;
  cin >> S;

  int N = S.size();
  dp[0][0] = 1;
  rep(i, N){
    int c;
    if(S[i] == '?') c = -1;
    else c = S[i] - '0';

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

    rep(j, 13) dp[i+1][j] %= mod;
  }

  cout << dp[n][5] << endl;
}

int main(){
// FastIO
//ios_base::sync_with_stdio(false);
cin.tie(NULL);
  solve();
  return 0;
}

Compiler output:
a.cc:69:16: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   69 | uint64_t dp[1e5+5][13];
      |             ~~~^~
a.cc:69:16: error: could not convert '(1.0e+5 + (double)5)' from 'double' to 'long unsigned int'
   69 | uint64_t dp[1e5+5][13];
      |             ~~~^~
      |                |
      |                double
a.cc:69:16: error: size of array 'dp' has non-integral type 'double'
a.cc: In function 'void solve()':
a.cc:73:10: error: 'S' was not declared in this scope
   73 |   cin >> S;
      |          ^
a.cc:92:14: error: 'n' was not declared in this scope
   92 |   cout << dp[n][5] << endl;
      |              ^
Language: C++

/*
*          Name : chaitanya
*
*     Institute : ANITS,Visakhapatnam
*
*/
#include<bits/stdc++.h>
#include<cstdio>
#include <iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<complex>
#include <cstring>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<bitset>
#include<numeric>
#include<limits>
#include<climits>
#include<cfloat>
#include<functional>
#include<iterator>
#include <random>
#define inf  1000000000
#define mod  1e9+7
#pragma GCC optimization ("O3")
using namespace std;
const long long int N = 6999999;
#define all(x) begin(x),end(x)
int dp[100000+10][13];
int cont[13]={0,4,8,12,3,7,11,2,6,10,1,5,9};
int main()
{
 
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
  //ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  dp[0][0] = 1;
  string s;
  cin >> s;
  int l = s.size();
  for (int i = 1; i <=l ; ++i){
    for (int j = 0; j <= 12; ++j){
    if(s[i-1] == '?'){
        if(i == 1){
            if(j < 10)
            dp[i][j] = 1;
            continue;
        }
        for (int k = 0; k <= 9; ++k){
            int lt = k-j;
            if(lt < 0)  lt += 13;
            dp[i][j] += dp[i-1][cont[lt]];
            dp[i][j] %= mod; 
        }
      }
      else{
          int lt = j-(s[i-1]-'0');
          if (lt < 0) lt += 13;
          if(i==1){
            dp[i][s[i-1]-'0'] = 1;
            break;
        }
        dp[i][j] = dp[i-1][cont[lt]];
      }
    }
  }
  cout << dp[l][5];
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:22: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   61 |             dp[i][j] %= mod;
      |                      ^
a.cc:61:22: note:   in evaluation of 'operator%=(int, double)'
Language: C++

/*
*          Name : chaitanya
*
*     Institute : ANITS,Visakhapatnam
*
*/
#include<bits/stdc++.h>
#include<cstdio>
#include <iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<complex>
#include <cstring>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<bitset>
#include<numeric>
#include<limits>
#include<climits>
#include<cfloat>
#include<functional>
#include<iterator>
#include <random>
#define inf  1000000000
#define mod  1e9+7
#pragma GCC optimization ("O3")
using namespace std;
const long long int N = 6999999;
#define all(x) begin(x),end(x)
int dp[100000+10][13];
int cont[13]={0,4,8,12,3,7,11,2,6,10,1,5,9};
int main()
{
 
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
  //ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  dp[0][0] = 1;
  string s;
  cin >> s;
  int l = s.size();
  for (int i = 1; i <=l ; ++i){
    for (int j = 0; j <= 12; ++j){
    if(s[i-1] == '?'){
        if(i == 1){
            if(j < 10)
            dp[i][j] = 1;
            continue;
        }
        for (int k = 0; k <= 9; ++k){
            int lt = k-j;
            if(lt < 0)  lt += 13;
            dp[i][j] += dp[i-1][cont[lt]];
            dp[i][j] %= MOD; 
        }
      }
      else{
          int lt = j-(s[i-1]-'0');
          if (lt < 0) lt += 13;
          if(i==1){
            dp[i][s[i-1]-'0'] = 1;
            break;
        }
        dp[i][j] = dp[i-1][cont[lt]];
      }
    }
  }
  cout << dp[l][5];
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:25: error: 'MOD' was not declared in this scope
   61 |             dp[i][j] %= MOD;
      |                         ^~~
Language: C++

import sys
input=sys.stdin.readline

S=input()
n=len(S)
R=[0]*13 #剰余テーブル
cnt=[0]*13
Pow=[[] for i in range(6)] #10の累乗の剰余テーブル
mod=10**9+7

for i in range(6):
    c=10**i
    for j in range(10):
        Pow[i].append(c*j%13)
ans=0
flag=0
for i in range(n):
    if S[n-i-1]=="?":
        P=Pow[i%6] #当該の剰余テーブル
        if flag==0:
            for p in P:
                R[p]=1
                flag=1
        else:
            for j in range(10):
                for k in range(13):
                    cnt[(k+P[j])%13]+=R[k]%mod
            R=cnt
            cnt=[0]*13
    else:
        x=int(S[n-i-1])
        ans+=Pow[i%6][x]
ans%=13
print(R[(18-ans)%13]%mod)

Compiler output:
a.cc:6:10: error: stray '#' in program
    6 | R=[0]*13 #剰余テーブル
      |          ^
a.cc:8:28: error: stray '#' in program
    8 | Pow=[[] for i in range(6)] #10の累乗の剰余テーブル
      |                            ^
a.cc:19:20: error: stray '#' in program
   19 |         P=Pow[i%6] #当該の剰余テーブル
      |                    ^
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define dunk(a) cout << (a) << "\n"
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1001001001;
const int mod = 1000000007;

struct mint {
	ll x;
	mint() :x(0) {}
	mint(ll x) :x((x% mod + mod) % mod) {}
	// mint(ll x):x(x){}
	mint& fix() { x = (x % mod + mod) % mod; return *this; }
	mint operator-() const { return mint(0) - *this; }
	mint operator~() const { return mint(1) / *this; }
	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) { (x *= a.pow(mod - 2).x) %= mod; return *this; }
	mint operator+(const mint& a)const { return mint(*this) += a; }
	mint operator-(const mint& a)const { return mint(*this) -= a; }
	mint operator*(const mint& a)const { return mint(*this) *= a; }
	mint operator/(const mint& a)const { return mint(*this) /= a; }
	mint pow(ll t) const {
		if (!t) return 1;
		mint res = pow(t / 2);
		res *= res;
		return (t & 1) ? res * x : res;
	}
	bool operator<(const mint& a)const { return x < a.x; }
	bool operator==(const mint& a)const { return x == a.x; }
};

mint dp[100001][13];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	string s;
	cin >> s;
	int n = s.size();
	dp[0][0] = 1;
	rep(i, n) {
		int c = (s[i] == '?' ? - 1 : int(s[i] - '0'));
		rep(j, 10) {
			if (c != -1 && c != j) continue;
			rep(k, 13) {
				dp[i + 1][(k * 10 + j) % 13] += dp[i][k];
			}
		}
	}
	mint ans = dp[n][5];
	printf_s("%d", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   58 |         printf_s("%d", ans);
      |         ^~~~~~~~
      |         printf
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPR(i, n) for(int i = (int)(n); i >= 0; i--)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

ll N, K, T, W, H, M, C;

const int MAX = 5100000;
const int MOD = 1e9 + 7;

const double PI=3.14159265358979323846;


long long fac[MAX], finv[MAX], inv[MAX];

vector<double> cx, cy, c;
 ll MM = 1e12;

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

std::vector<int> Eratosthenes(int n ){
    std::vector<bool> is_prime( n + 1 );
    for( int i = 0; i <= n; i++ ) is_prime[ i ] = true;
    std::vector<int> P;
    for( int i = 2; i <= n; i++ ){
        if( is_prime[ i ] ){
            for( int j = 2 * i; j <= n; j += i ){
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}

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

int main(){
    string str;
    cin >> str;
    N = str.size();
    vector<vector<ll>> dp(N + 1, vector<ll> (13, 0));
    dp[0][0] = 1;

    for(int i = 0; i < N; ++i){
        if(str[i] == '?'){
            for(int j = 0; j < 13; ++j){
                for(int k = 0; k < 10; ++k){
                    dp[i + 1][(10*j + k) % 13] += dp[i][j]%MOD;
                    dp[i + 1][(10*j + k) % 13] %= MOD;
                }
            }
        }
        else{
            int num = str[i] - '0';
            for(int j = 0; j < 13; ++j){
                dp[i + 1][(10*j + num) % 13] += dp[i][j]%MOD;
                dp[i + 1][(10*j + num) % 13] %= MOD;
            }
        }
    }
    cout << dp[N ][5];
    return 0;
}

Compiler output:
a.cc:54:1: error: ISO C++ forbids declaration of 'gcd' with no type [-fpermissive]
   54 | gcd(ll a, ll b){
      | ^~~
Language: C++

#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin>>s;
    ll n=s.length();
    ll a[n+1][13];
    memset(a,0,sizeof(a));
    a[0]=1;
    for(int i=0;i<n;i++){
        if(s[i]=='?'){
            for(int k=0;k<10;k++){
                for(int j=0;j<13;j++){
                    a[i+1][(j+k)]+=a[i][j];
                }
            }
        }else{
            int k=(s[i]-'0');
            for(int j=0;j<13;j++){
                a[i+1][(j+k)]+=a[i][j];
            }
        }
    }
    cout << a[n][5]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: incompatible types in assignment of 'int' to 'll [13]' {aka 'long long int [13]'}
   18 |     a[0]=1;
      |     ~~~~^~
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;
int main(void) {
    string s; cin >> s;
    ll dp[100005][13]={0};
    int n = s.size();
    dp[0][0] = 1;
    rep(i,n) {
        int c;
        if(s[i] == '?') c = -1;
        else c = s[i] - '0';
        
        rep(j,10) {
            if(c!=-1 && c!=j) continue;
            rep(k1,13) {
                dp[i+1][(ki*10+j)%13] += dp[i][ki];
            }
        }
        rep(j,13) dp[i+1][j] %= mod;
    }
    cout << dp[n][5];
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: 'ki' was not declared in this scope; did you mean 'k1'?
   19 |                 dp[i+1][(ki*10+j)%13] += dp[i][ki];
      |                          ^~
      |                          k1
Language: C++

#include <bits/stdc++.h>
#define ALL(obj) begin(obj), end(obj)
using namespace std;
using ll = long long;
using ull = unsigned long long;

const int INF = 2100100100;
const int MOD = 1e9 + 7;

int dp[110000][13];

int main() {
    // cin.tie(0);
    // ios::sync_with_stdio(false);

    string S;
    cin >> S;
    int len = S.size();
    reverse(S.begin(), S.end());

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

    int num = 1;
    for (int i = 1; i < len; is++) {
        num *= 10;
        num %= 13;

        if (S[i] == '?') {
            for (int j = 0; j < 10; j++) {
                for (int k = 0; k < 13; k++) {
                    int index = (k + j * num) % 13;
                    dp[i][index] += dp[i - 1][k];
                    dp[i][index] %= MOD;
                }
            }
        } else {
            for (int k = 0; k < 13; k++) {
                int j = (S[i] - '0');
                int index = (k + j * num) % 13;
                dp[i][index] += dp[i - 1][k];
                dp[i][index] %= MOD;
            }
        }
    }

    cout << dp[len - 1][5] << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:30: error: 'is' was not declared in this scope; did you mean 'i'?
   31 |     for (int i = 1; i < len; is++) {
      |                              ^~
      |                              i
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    long MOD = (long)Math.pow(10, 9) + 7;
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    long len = s.length();
    long[][] dp = new long[len][13];
    if(s.charAt(0) == '?') {
      for(int j = 0; j < 10; j++) {
        dp[0][j] = 1;
      }
    } else {
      int d = Integer.parseInt(s.charAt(0));
      dp[0][d] = 1;
    }
    for(int i = 1; i < len; i++) {
      if(s.charAt(i) == '?') {
        for(int j = 0; j < 13; j++) {
          for(int k = 0; k < 10; k++) {
            dp[i][(10 * j + k) % 13] = (dp[i][(10 * j + k) % 13] + dp[i - 1][j]) % MOD;
          }
        }        
      } else {
        for(int j = 0; j < 13; j++) {
          int d = Integer.parseInt(s.charAt(i));
          dp[i][(10 * j + d) % 13] = (dp[i][(10 * j + d) % 13] + dp[i - 1][j]) % MOD;
        }        
      }
    }
    System.out.println(dp[len - 1][5]);
  }
}


Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from long to int
    long[][] dp = new long[len][13];
                           ^
Main.java:15: error: incompatible types: char cannot be converted to String
      int d = Integer.parseInt(s.charAt(0));
                                       ^
Main.java:27: error: incompatible types: char cannot be converted to String
          int d = Integer.parseInt(s.charAt(i));
                                           ^
Main.java:32: error: incompatible types: possible lossy conversion from long to int
    System.out.println(dp[len - 1][5]);
                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main(){

  string s;
  
  cin >> s ;
  
  long long int dp[100010][15];
  
  dp[0][0] = 1;
  
  for(int i=0;i<s.size();i++){
    
    for(int j=0;j<13;j++){
      
    if(s[i] == '?'){
      for(int k=0;k<10;k++){
        dp[i+1][(j*10+k)%13] += dp[i][j];
      }
      else{
       int k = (int) s[i]-'0';
        
        dp[i+1][(j*10+k)%13] += dp[i][j];
        
      }
    }
    }
    
    cout << dp[s.size()][5] << endl;
    
  }
        


Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: expected '}' before 'else'
   24 |       else{
      |       ^~~~
a.cc:20:20: note: to match this '{'
   20 |     if(s[i] == '?'){
      |                    ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main(){

  string s;
  
  cin >> s ;
  
  long long int dp[100010][15];
  
  dp[0][0] = 1;
  
  for(int i=0;i<s.size();i++){
    
    for(int j=0;j<13;j++){
      
    if(s[i] == '?'){
      for(int k=0;k<10;k++){
        dp[i+1][(j*10+k)%13] += dp[i][j];
      }
      else{
        k = (int) s[i]-'0';
        
        dp[i+1][(j*10+k)%13] += dp[i][j];
        
      }
    }
    }
    
    cout << dp[s.size()][5] << endl;
    
  }
        

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: expected '}' before 'else'
   24 |       else{
      |       ^~~~
a.cc:20:20: note: to match this '{'
   20 |     if(s[i] == '?'){
      |                    ^
a.cc:25:9: error: 'k' was not declared in this scope
   25 |         k = (int) s[i]-'0';
      |         ^
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <set>
#include <cstdio>
#include <vector>
#include <iostream>
#include <utility>

#define fir first
#define sec second
#define pb push_back
#define get(n) scanf("%d",&n);
#define gets(s) string s;cin >> (s);
#define prfi(n) printf("%d", &n);
#define prfd(n) printf("%lf", &n);
#define All(s) (s).begin(), (s).end()
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define repk(i, j, k) for(int (i)=(j);(i)<(k);(i)++)
#define repdown(i, j, k) for(int (i)=(j);(i)>=(j);(i)--)
#define dump(x)  std::cout << #x << " = " << (x) << std::endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

using ll = long long;
using vi = std::vector<int> ;
using vvi = std::vector<vi> ;
using vd = std::vector<double> ;
using vvd = std::vector<vd> ;
using qi = std::queue<int> ;
using vpii = std::vector<std::pair<int, int> >;
using namespace std;

const int Mod = 1e9 + 7;
const int max_n = 3 * 1e5 + 1;
const int max_m = 83 * 1e5 + 1;
const ll INF = 10241024;
long double INFD = 100100100;

//_________template______________
inline void IN(void){
  return;
}

template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){
  cin >> first;
  IN(rest...);
  return;
}

inline void OUT(void){
  cout << "\n";
  return;
}

template <typename First, typename... Rest>
void OUT(First first, Rest... rest){
  cout << first << " ";
  OUT(rest...);
  return;
}

//_____________________array calc____________________________________//
/*
vvi mul(vvi &A, vvi &B){
  vvi C(A.size(), vi(B.size()))
  rep(i,A.size()){
    rep(j,B.size()){
      rep(k,B[0].size()){
        C[i][j] = (C[i][j] A[i][k] + B[k][j]) % Mod;
      }
    }
  }

  return C;
}

vvi pow(vvi A, ll n){
  vvi B(A.size(), vi(A.size()));
  rep(i=0;i<A.size();i++){
    B[i][i] = 1;
  }

  while (n >0){
    if (n & 1) B = mul(B, A);
    A = mul(A, A);
    n = n >> 1;
  }
  return B;
}
*/
//_____________________Bynary Indexed Tree __________________________//
/*
const max_st = (1 << 15) - 1;
int bit[max_st];
int sum (int i){
  int s = 0;
  while(i > 0){
    s += bit[i];
    i -= i & -i;
  }
  return s;
}

void add(int i, int x){
  while(i <= n){
    bit[i] += x;
    i += i & -i;
  }
}
*/
//_____________________　following sorce code_________________________//
string s;
const N = 13;
ll dp[INF][13];
void input(){
  IN(s);
}

void solve(){
  input();
  dp[0][0] = 1;
  int n = s.size();
  int mul = 1;
  for(int i=n-1;i>=0;i++){
    rep(j,13){
      rep(k,10){
        if(s[i] - '0' == k || s[i] == '?')
        {
          ( dp[i+1][((k*mul) + j) % N] += dp[i][j] ) %= Mod;
        }
      }
    }
    mul *= 10;
  }
  
  OUT(dp[n][5]);
}

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




Compiler output:
a.cc:115:7: error: 'N' does not name a type
  115 | const N = 13;
      |       ^
a.cc: In function 'void solve()':
a.cc:131:37: error: 'N' was not declared in this scope
  131 |           ( dp[i+1][((k*mul) + j) % N] += dp[i][j] ) %= Mod;
      |                                     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <bitset>
#include <vector>
#include <queue>
#include <map>
#include <set>

#define i64 int64_t
#define ff(ii,nn,mm) for(int ii=nn;ii<mm;ii++)
#define st(vvv) sort(vvv.begin(),vvv.end())
#define rvs(vvv) reverse(vvv.begin(),vvv.end())
int inf = 1000000007;
i64 giant = 4000000000000000000;

using namespace std;

int main() {
	string s;
	cin >> s;
	i64 dp[100010][13];
	dp[0][0] = 1;
	ff(i, 1, 13) {
		dp[0][i] = 0;
	}
	ff(i, 0, s.size()) {
		int b;
		if (s[i] != '?')b = s[i] - '0';
		else b = -1;
		ff(j, 0, 13)dp[i + 1][j] = 0;
		if (b >= 0) {
			ff(j, 0, 13) {
				dp[i + 1][(j * 10 + b) % 13] += dp[i][j];
			}
		}
		else {
			ff(j, 0, 13) {
				ff(k, 0, 10) {
					dp[i + 1][(j * 10 + k) % 13] += dp[i][j];
				}
			}
			ff(j,0,13)dp[i + 1][j] %= inf;
		}
	}
	cout << dp[s.size()][5] << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:48:18: error: expected '}' at end of input
   48 |         return 0;
      |                  ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  string s;
  cin>>s;
  reverse(all(s));
  int dp[100010][13]={0}
  dp[0][0]=1;
  int mul=1;
  int mod=1000000000+7;
  for(int i=1;i<=s.size();i++){
    if(s[i-1]=='?'){
      for(int j=0;j<10;j++){
        int r=j*mul;
        int g=r%13;
        rep(h,13){
          dp[i][(h+g)%13]+=dp[i-1][h];
          dp[i][(h+g)%13]%=mod;
        }
      }
    }
    else{
      int c=(s[i-1]-'0');
      int e=c*mul%13;
      rep(h,13){
        dp[i][(h+e)%13]+=dp[i-1][h];
        dp[i][(h+e)%13]%=mod;
      }
    }
    mul*=10;
    mul%=13;
  }
  int q=s.size();
  COUT(dp[q][5]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: expected ',' or ';' before 'dp'
   33 |   dp[0][0]=1;
      |   ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  int h;
  string s;
  cin>>s;
  int dp[100010][13];
  dp[0][0]=1;
  mul=1;
  int mod=1000000000+7;
  for(int i=1;i<=s.size();i++){
    if(s[i]=='?'){
      for(int j=0;j<10;j++){
        int r=j*mul;
        int g=r%13;
        rep(h,13){
          dp[i+1][(h+g)%13]+=dp[i][h];
          dp[i+1][(h+g)%13]%=mod;
        }
      }
    }
    else{
      int c=(s[i]-'0');
      int e=c*mul%13;
      rep(h,13){
        dp[i+1][(h+c)%13]+=dp[i][c];
        dp[i+1][(h+c)%13]%=mod;
      }
    }
    mul*=10;
  }
  int q=s.size();
  cout<<dp[q][5];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:3: error: 'mul' was not declared in this scope; did you mean 'fmul'?
   34 |   mul=1;
      |   ^~~
      |   fmul
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  int h
  string s;
  cin>>s;
  int dp[100010][13];
  dp[0][0]=1;
  mul=1;
  int mod=1000000000+7;
  for(int i=1;i<=s.size();i++){
    if(s[i]=='?'){
      for(int j=0;j<10;j++){
        int r=j*mul;
        int g=r%13;
        rep(h,13){
          dp[i+1][(h+g)%13]+=dp[i][h];
          dp[i+1][(h+g)%13]%=mod;
        }
      }
    }
    else{
      int c=(s[i]-'0');
      int e=c*mul%13;
      rep(h,13){
        dp[i+1][(h+c)%13]+=dp[i][c];
        dp[i+1][(h+c)%13]%=mod;
      }
    }
    mul*=10;
  }
  int q=s.size();
  cout<<dp[q][5];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: expected initializer before 'string'
   30 |   string s;
      |   ^~~~~~
a.cc:31:8: error: 's' was not declared in this scope
   31 |   cin>>s;
      |        ^
a.cc:34:3: error: 'mul' was not declared in this scope; did you mean 'fmul'?
   34 |   mul=1;
      |   ^~~
      |   fmul
Language: C++

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define Khela ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int
#define llu long long unsigned int
#define pf printf
#define sf scanf
#define f first
#define s second
#define pb push_back
#define mk make_pair
#define pii pair<int ,int>
#define PII pair<ll ,ll>
 
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int dx4[] = {0, 0, 1, -1};
int dy4[] = {1, -1, 0, 0};
 
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
int Set(int N,int pos){return N=N | (1<<pos);}
int reset(int N,int pos){return N= N & ~(1<<pos);}
bool check(int N,int pos){return (bool)(N & (1<<pos));}
const int max=1e9+100;
const ll  MAX=1e18+500;
const int sz=1e5+100;
const ll mod=1e9+7;
int mark[sz];
ll dp[sz][14];
ll n;
string str;
ll cholo(ll id,ll sum)
{
    if(id>=n){
        if(sum%13==5) return 1;
        else return 0;

    ll &ret=dp[id][sum];
    if(~ret) return ret;
    ll tot=0;
    if(str[id] != '?') ret=cholo(id+1,(sum*10+(str[id]-'0'))%13);
    else{
        for(ll i=0;i<=9;i++) tot=(tot+cholo(id+1,(sum*10+i)%13))%mod;
        ret=tot;
    }

    return ret;
    
    
}
int main()
{
    Khela
    ll a,b,c,i,j,k,q,p,x,y,ct,ct1,m,l,r,x1,y1,mn,h,sum1,in,z,mid,mx;
    char ch;
    double d;
    //string str1;
    bool bl,bl1;
    int t,cs=1;
    while(cin>>str)
    {
        memset(dp,-1,sizeof dp);
        n=str.length();
        ll ans=cholo(0,0);
        cout<<ans<<endl;
      
        
    }





}

Compiler output:
a.cc: In function 'long long int cholo(long long int, long long int)':
a.cc:54:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   54 | int main()
      |         ^~
a.cc:54:9: note: remove parentheses to default-initialize a variable
   54 | int main()
      |         ^~
      |         --
a.cc:54:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:55:1: error: a function-definition is not allowed here before '{' token
   55 | {
      | ^
a.cc:77:2: error: expected '}' at end of input
   77 | }
      |  ^
a.cc:36:1: note: to match this '{'
   36 | {
      | ^
a.cc:77:2: warning: control reaches end of non-void function [-Wreturn-type]
   77 | }
      |  ^
Language: C++

#include <bits/stdc++.h>

#define rep(i, a, n)  for(ll i=a; i<n; i++)
#define per(i, a, n)  for(ll i=n-1; i>=a; i--)
#define fill0(n)  setfill('0') << right << setw(n)
#define all(x)  (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define LONGMAX 1e18
#define intMAX 1000000000
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod = 1e9+7;

string s;
int dp[100100][13];

int main(){
	cin >> s;
	int n = s.size();
	dp[0][0]=0;
	// 桁についてループ
	for(int i=0; i<n; i++){
		int c;
		if(s[i] == '?') c=-1;
		else c = s[i] - '0';
		// ? だった場合の全処理
		for(int j; j < 10; j++){
			if (c != -1 && c != j)continue;
			
			//i-1文字目までの数が[ki]の時に，それを１０倍してjを加えた部分に
			// あまりはうつるよね？
			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;
	}

	cout << dp[n][5] << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:60: error: expected ']' before ';' token
   38 |                 for(int j = 0; j < 13; j++)dp[i+1][j %= mod;
      |                                                            ^
      |                                                            ]
Language: C++

#include <bits/stdc++.h>

#define rep(i, a, n)  for(ll i=a; i<n; i++)
#define per(i, a, n)  for(ll i=n-1; i>=a; i--)
#define fill0(n)  setfill('0') << right << setw(n)
#define all(x)  (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define LONGMAX 1e18
#define intMAX 1000000000
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod = 1e9+7;

string s;
int dp[100100][13];

int main(){
	cin >> s;
	int n = s.size();
	dp[0][0]=0;
	// 桁についてループ
	for(int i=0; i<n; i++){
		int c;
		if(s[i] == '?') c=-1;
		else c = s[i] - '0';
		// ? だった場合の全処理
		for(int j; j < 10; j++){
			if (c != -1 && c != j)continue;
			
			//i-1文字目までの数が[ki]の時に，それを１０倍してjを加えた部分に
			// あまりはうつるよね？
			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;
	}

	cout << dp[n][5] << endl;
	return 0

}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:60: error: expected ']' before ';' token
   38 |                 for(int j = 0; j < 13; j++)dp[i+1][j %= mod;
      |                                                            ^
      |                                                            ]
a.cc:42:17: error: expected ';' before '}' token
   42 |         return 0
      |                 ^
      |                 ;
   43 | 
   44 | }
      | ~