Language: C++

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}
 
#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};
 
    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
 
    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}
 
#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };
 
    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };
 
    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };
 
    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };
 
    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };
 
    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input! {
        s: chars,
    }

    let d = 1e9 as u64 + 7;

    let n = 13;
    //let s = vec!['?'; 100000];
    let mut dp = vec![0; n];

    dp[0]= 1;

    let mut mul = 1;
    for v in s.iter().rev() {
        let mut next_dp = vec![0; n];
        if *v == '?' {
           for i in 0..10 {
               for j in 0..n {
                   next_dp[(i*mul+j)%n] = next_dp[(i*mul+j)%n] + dp[j];
                   next_dp[(i*mul+j)%n] = next_dp[(i*mul+j)%n] % d;
               }
           } 
        } else {
            let num = v.to_digit(10).unwrap() as usize;

            for j in 0..n {
                next_dp[(num*mul+j)%n] = next_dp[(num*mul+j)%n] + dp[j];
                next_dp[(num*mul+j)%n] = next_dp[(num*mul+j)%n] % d;
            }

        }

        for i in 0..n {
            dp[i] = next_dp[i];
        }
        mul = mul * 10;
        mul = mul % d as usize;
    }

    println!("{}", dp[5]);  

}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_macros)]
      |  ^
a.cc:23:2: error: invalid preprocessing directive #[
   23 | #[allow(unused_macros)]
      |  ^
a.cc:39:2: error: invalid preprocessing directive #[
   39 | #[allow(unused_macros)]
      |  ^
a.cc:46:10: error: too many decimal points in number
   46 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:82:21: error: too many decimal points in number
   82 |            for i in 0..10 {
      |                     ^~~~~
a.cc:83:25: error: too many decimal points in number
   83 |                for j in 0..n {
      |                         ^~~~
a.cc:91:22: error: too many decimal points in number
   91 |             for j in 0..n {
      |                      ^~~~
a.cc:98:18: error: too many decimal points in number
   98 |         for i in 0..n {
      |                  ^~~~
a.cc:2:1: error: 'macro_rules' does not name a type
    2 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:24:1: error: 'macro_rules' does not name a type
   24 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:40:1: error: 'macro_rules' does not name a type
   40 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:65:1: error: 'fn' does not name a type
   65 | fn main() {
      | ^~