Language: C++

use std::collections::HashMap;

fn collect_primes(n: u64) -> HashMap<u64, u32> {
    let mut primes = HashMap::<u64, u32>::new();
    let mut cur = n;
    let mut i = 2_u64;
    if n == 1 {
        primes.insert(1, 1);
        return primes;
    }
    while i != cur {
        if cur % i  == 0 {
            *(primes.entry(i).or_insert(0)) += 1;
            cur /= i;
            continue;
        }
        i += 1;
    }
    primes.entry(cur).and_modify(|i| *i=*i+1).or_insert(1);
    primes
}

fn union_primes(l: HashMap<u64, u32>, r: HashMap<u64,u32>) -> HashMap<u64,u32>{
    let mut nprimes = l.clone();
    for p1 in l.keys() {
        let lp = l.get(p1).unwrap();
        let rp = r.get(p1).unwrap_or(&0);
        if lp > rp {
            nprimes.insert(*p1, *lp);
        } else {
            nprimes.insert(*p1, *rp);
        }
    }
    for p2 in r.keys() {
        let n = *(nprimes.get(p2).unwrap_or(&0));
        let rp = r.get(p2).unwrap();
        if n < *rp {
            nprimes.entry(*p2).or_insert(*rp);
        }
    }
    nprimes
}

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)*}
    };
}

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)*}
    };
}

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, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}


fn main() {
    input! {
        n : usize,
        tx : [[u64; 1]; n],
    }
    let mut base = HashMap::<u64,u32>::new();
    for i in 0 .. n {
        let prime = collect_primes( tx[i][0] );
        base = union_primes(base, prime);
        println!("{:?}", base);
    }
    let mut ans = 1u64;
    for (k,v) in base.iter() {
        ans *= (*k).pow(*v);
    }
    println!("{}", ans)
}


Compiler output:
a.cc:81:10: error: too many decimal points in number
   81 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::collections::HashMap;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn collect_primes(n: u64) -> HashMap<u64, u32> {
      | ^~
a.cc:23:1: error: 'fn' does not name a type
   23 | fn union_primes(l: HashMap<u64, u32>, r: HashMap<u64,u32>) -> HashMap<u64,u32>{
      | ^~
a.cc:44:1: error: 'macro_rules' does not name a type
   44 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:65:1: error: 'macro_rules' does not name a type
   65 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:75:1: error: 'macro_rules' does not name a type
   75 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:98:1: error: 'fn' does not name a type
   98 | fn main() {
      | ^~